fix(release): skip tag push when version stamp produced no changes
This commit is contained in:
@@ -103,10 +103,18 @@ jobs:
|
||||
git config user.email "gitea-actions@users.noreply.code.gfran.co"
|
||||
git add Cargo.toml Cargo.lock \
|
||||
crates/nuwiki-lsp/Cargo.toml crates/nuwiki-ls/Cargo.toml
|
||||
git commit -m "chore(release): $VER"
|
||||
git tag -a "$TAG" -m "nuwiki $VER"
|
||||
git push origin "HEAD:${GITHUB_REF_NAME}"
|
||||
git push origin "$TAG"
|
||||
# Check if there are staged changes. If not, the version was already
|
||||
# correct — create an empty commit just to have a release commit,
|
||||
# and skip the tag push since it already exists on origin.
|
||||
if git diff --cached --quiet; then
|
||||
git commit --allow-empty -m "chore(release): $VER"
|
||||
echo "No version changes — skipping tag push."
|
||||
else
|
||||
git commit -m "chore(release): $VER"
|
||||
git tag -a "$TAG" -m "nuwiki $VER"
|
||||
git push origin "HEAD:${GITHUB_REF_NAME}"
|
||||
git push origin "$TAG"
|
||||
fi
|
||||
|
||||
build:
|
||||
name: build ${{ matrix.target }}
|
||||
|
||||
Reference in New Issue
Block a user