Skip to content

Commit 6ba8dc9

Browse files
katipallyCopilot
andcommitted
fix(release): stage only appcast.xml to avoid workflow-file push rejection
The previous `git add -A` was staging 2 files (visible in '2 files changed, 9 insertions, 2 deletions'). The second file was almost certainly .github/workflows/release.yml — touched by an earlier step in the pipeline. GITHUB_TOKEN cannot push commits that modify workflow files, so the push was rejected 5 times in a row. Restricting the stage to 'git add appcast.xml' guarantees nothing else sneaks into the commit. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 6a5da49 commit 6ba8dc9

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,9 +454,15 @@ jobs:
454454
git config user.name "github-actions[bot]"
455455
git config user.email "github-actions[bot]@users.noreply.github.com"
456456
457+
# CRITICAL: stage ONLY appcast.xml. `git add -A` was picking up
458+
# spurious workspace mutations (likely .github/workflows/release.yml
459+
# touched by checkout/version-bump steps) which then caused the push
460+
# to be rejected — GITHUB_TOKEN cannot modify workflow files at all,
461+
# regardless of `permissions:`. Restricting the stage to the file we
462+
# actually want to commit avoids the entire class of issue.
457463
for attempt in 1 2 3 4 5; do
458464
echo "--- Commit attempt ${attempt} ---"
459-
git add -A
465+
git add appcast.xml
460466
if ! git diff --cached --quiet; then
461467
git commit -m "chore: update appcast.xml for ${{ env.TAG }}"
462468
fi

0 commit comments

Comments
 (0)