Improve eBPF versioning (#101) #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2024 Dynatrace LLC | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# https://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
name: Main push build, test and publish Release | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
main-push-build-test-and-publish-release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source code of the repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set Git identity | |
run: | | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git config --global user.name "github-actions[bot]" | |
- name: Set new version tag | |
run: | | |
currentTagValue=$(git describe --abbrev=0 --tags) | |
minor=$(echo $currentTagValue | cut -d '.' -f 2) | |
patch=$(echo $currentTagValue | cut -d '.' -f 3) | |
newTagValue=1.$(($minor)).$((patch+1)) | |
git tag -a $newTagValue -m "Main push tagging with $newTagValue" | |
echo "Current tag value: $currentTagValue New tag value: $newTagValue" >> $GITHUB_STEP_SUMMARY | |
git push origin $newTagValue | |
- name: Build, test and publish Release | |
uses: ./.github/actions/build-test-and-publish-release | |
with: | |
pat-github-token: ${{ secrets.GITHUB_TOKEN }} |