mirror of
https://github.com/nicholasr-itsulu/FediFetcher.git
synced 2026-05-30 23:41:26 +00:00
Merge pull request #189 from nanos/fix-tagging
only update version tag if not already up to date
This commit is contained in:
commit
c5eb941eb9
1 changed files with 8 additions and 6 deletions
2
.github/workflows/update-version-number.yaml
vendored
2
.github/workflows/update-version-number.yaml
vendored
|
|
@ -18,12 +18,14 @@ jobs:
|
||||||
git config user.email bot@thms.uk
|
git config user.email bot@thms.uk
|
||||||
VERSION=${{ github.ref_name }}
|
VERSION=${{ github.ref_name }}
|
||||||
VERSION="${VERSION:1}"
|
VERSION="${VERSION: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
|
sed -i -E 's/VERSION = "[0-9]+.[0-9]+.[0-9]+"/VERSION = "'$VERSION'"/' find_posts.py
|
||||||
git add find_posts.py
|
git add find_posts.py
|
||||||
git commit -m "[bot] Bump version to $VERSION"
|
git commit -m "[bot] Bump version to $VERSION"
|
||||||
git push origin HEAD:main > /dev/null 2>&1
|
git push origin HEAD:main > /dev/null 2>&1
|
||||||
git tag -f "v$VERSION"
|
git tag -f "v$VERSION"
|
||||||
git push -f origin "v$VERSION" > /dev/null 2>&1
|
git push -f origin "v$VERSION" > /dev/null 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
docker:
|
docker:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue