-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #189 from nanos/fix-tagging
only update version tag if not already up to date
- Loading branch information
Showing
1 changed file
with
8 additions
and
6 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 |
---|---|---|
|
@@ -18,12 +18,14 @@ jobs: | |
git config user.email [email protected] | ||
VERSION=${{ github.ref_name }} | ||
VERSION="${VERSION:1}" | ||
sed -i -E 's/VERSION = "[0-9]+.[0-9]+.[0-9]+"/VERSION = "'$VERSION'"/' find_posts.py | ||
git add find_posts.py | ||
git commit -m "[bot] Bump version to $VERSION" | ||
git push origin HEAD:main > /dev/null 2>&1 | ||
git tag -f "v$VERSION" | ||
git push -f origin "v$VERSION" > /dev/null 2>&1 | ||
if ! grep "VERSION = \"$VERSION\"" "find_posts.py"; then | ||
sed -i -E 's/VERSION = "[0-9]+.[0-9]+.[0-9]+"/VERSION = "'$VERSION'"/' find_posts.py | ||
git add find_posts.py | ||
git commit -m "[bot] Bump version to $VERSION" | ||
git push origin HEAD:main > /dev/null 2>&1 | ||
git tag -f "v$VERSION" | ||
git push -f origin "v$VERSION" > /dev/null 2>&1 | ||
fi | ||
docker: | ||
runs-on: ubuntu-latest | ||
|