Skip to content

Commit 8e55fec

Browse files
Fix release workflow tags
1 parent 3aa2971 commit 8e55fec

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

.github/workflows/release-prepare.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,21 +46,28 @@ jobs:
4646
run: node scripts/bump-version.mjs "$APP" "$VERSION"
4747

4848
- name: Commit + push branch
49+
id: commit
4950
env:
5051
APP: ${{ steps.parse.outputs.app }}
5152
VERSION: ${{ steps.parse.outputs.version }}
5253
run: |
5354
git add -A
5455
if git diff --cached --quiet; then
55-
echo "No version changes to commit — does package.json/app.json/Info.plist already match?"
56-
exit 1
56+
# No-op, not an error: the publish workflow force-moves the tag onto
57+
# the merge commit, which re-fires this workflow. By then the files
58+
# already hold v${VERSION}, so there's nothing to prepare. Same for a
59+
# manual tag re-push. Skip the rest of the job cleanly.
60+
echo "${APP} is already at v${VERSION} — nothing to prepare. Skipping."
61+
echo "changed=false" >> "$GITHUB_OUTPUT"
62+
exit 0
5763
fi
5864
git commit -m "release(${APP}): v${VERSION}"
5965
# Force push so a leftover branch from a previous failed run of this
6066
# same tag doesn't block us. The branch is automation-owned.
6167
git push -fu origin "release/${APP}-${VERSION}"
6268
6369
- name: Open PR
70+
if: steps.commit.outputs.changed != 'false'
6471
env:
6572
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6673
APP: ${{ steps.parse.outputs.app }}

0 commit comments

Comments
 (0)