forked from gcovr/gcovr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
18 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|