Skip to content

Commit

Permalink
Add tagging to pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Spacetown committed Feb 3, 2024
1 parent 6005ba7 commit cf433dc
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,24 @@ jobs:
key: ${{ runner.os }}-pip-${{ hashFiles('noxfile.py', 'doc/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Apply new tag if version is bumped
# if: ${{ success() && (github.event.ref == 'refs/heads/main') }}
run: |
set -e
git config --global user.email "[email protected]"
git config --global user.name "gcovr authors"
# Get the version
Version="$(sed -n 's/__version__.*"\(.*\)"/\1/ p' gcovr/version.py)"
# Try to create the tag and print the output. It's only pushed if it's a real release
git tag -a "$Version" -m "$Version ($(date -Iminutes))"
git tag --list -n "$Version"
# Check if it is a new release
if echo "$Version" | grep -E '^\d+\.\d+$'; then
echo "New version bumped"
else
echo "Skip pushing tag for development build"
fi
- name: Install build commands and GCC
run: |
sudo apt update
Expand Down

0 comments on commit cf433dc

Please sign in to comment.