Skip to content

Commit 05515af

Browse files
claudensheaps
authored andcommitted
fix: resolve CD pipeline failure and increase release verbosity
The auto-release workflow was failing with "npm error Version not changed" because @release-it/bumper and release-it's built-in npm plugin were both trying to bump package.json, causing a conflict. Changes: - Remove package.json from bumper plugin's `out` array (root cause fix) - Add --verbose flag to all release-it invocations for better debugging - Add "Debug release-it state" step showing version, tags, dry-run output - Switch from GITHUB_TOKEN to GitHub App auth (nsheaps/github-actions) for release workflows, which provides proper permissions for pushing commits, tags, and creating releases - Apply same auth pattern to release-web.yml for gh-pages deploys https://claude.ai/code/session_01CowQd6RG8QZSDocdtEJ2dK
1 parent 4520912 commit 05515af

File tree

4 files changed

+60
-13
lines changed

4 files changed

+60
-13
lines changed

.github/workflows/auto-release.yml

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,18 @@ jobs:
1818
# Skip release commits to avoid infinite loops
1919
if: "!startsWith(github.event.head_commit.message, 'chore: release v')"
2020
steps:
21+
- name: Authenticate as GitHub App
22+
id: auth
23+
uses: nsheaps/github-actions/.github/actions/github-app-auth@main
24+
with:
25+
app-id: ${{ secrets.AUTOMATION_GITHUB_APP_ID }}
26+
private-key: ${{ secrets.AUTOMATION_GITHUB_APP_PRIVATE_KEY }}
27+
2128
- name: Checkout
2229
uses: actions/checkout@v4
2330
with:
2431
fetch-depth: 0
32+
token: ${{ steps.auth.outputs.token }}
2533

2634
- name: Install mise
2735
uses: jdx/mise-action@v2
@@ -34,17 +42,32 @@ jobs:
3442

3543
- name: Configure git
3644
run: |
37-
git config user.name "github-actions[bot]"
38-
git config user.email "github-actions[bot]@users.noreply.github.com"
3945
# Set up branch tracking so release-it doesn't fail on upstream check
4046
git branch --set-upstream-to=origin/main main 2>/dev/null || true
4147
48+
- name: Debug release-it state
49+
run: |
50+
echo "=== Git status ==="
51+
git status
52+
echo ""
53+
echo "=== Current version ==="
54+
node -p "require('./package.json').version"
55+
echo ""
56+
echo "=== Latest tags ==="
57+
git tag --sort=-v:refname | head -10 || echo "No tags found"
58+
echo ""
59+
echo "=== Recent commits ==="
60+
git log --oneline -10
61+
echo ""
62+
echo "=== release-it dry run ==="
63+
bunx release-it --dry-run --verbose --ci 2>&1 || true
64+
4265
- name: Determine version bump
4366
id: version
4467
run: |
4568
set +e
4669
# Get the recommended bump from conventional commits
47-
NEXT_VERSION=$(bunx release-it --release-version --ci 2>&1)
70+
NEXT_VERSION=$(bunx release-it --release-version --verbose --ci 2>&1)
4871
EXIT_CODE=$?
4972
set -e
5073
@@ -60,6 +83,6 @@ jobs:
6083
6184
- name: Release
6285
if: steps.version.outputs.skip != 'true'
63-
run: bun run release:ci
86+
run: bun run release:ci -- --verbose
6487
env:
65-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
88+
GITHUB_TOKEN: ${{ steps.auth.outputs.token }}

.github/workflows/release-web.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,17 @@ jobs:
1919
build-and-deploy:
2020
runs-on: ubuntu-latest
2121
steps:
22+
- name: Authenticate as GitHub App
23+
id: auth
24+
uses: nsheaps/github-actions/.github/actions/github-app-auth@main
25+
with:
26+
app-id: ${{ secrets.AUTOMATION_GITHUB_APP_ID }}
27+
private-key: ${{ secrets.AUTOMATION_GITHUB_APP_PRIVATE_KEY }}
28+
2229
- uses: actions/checkout@v4
30+
with:
31+
fetch-depth: 0
32+
token: ${{ steps.auth.outputs.token }}
2333

2434
- uses: jdx/mise-action@v2
2535

@@ -42,9 +52,6 @@ jobs:
4252

4353
- name: Deploy to GitHub Pages (app/ subdirectory)
4454
run: |
45-
git config user.name "github-actions[bot]"
46-
git config user.email "github-actions[bot]@users.noreply.github.com"
47-
4855
# Fetch gh-pages branch or create it
4956
git fetch origin gh-pages || true
5057
git checkout gh-pages || git checkout --orphan gh-pages

.github/workflows/release.yml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,18 @@ jobs:
3030
name: Release
3131
runs-on: ubuntu-latest
3232
steps:
33+
- name: Authenticate as GitHub App
34+
id: auth
35+
uses: nsheaps/github-actions/.github/actions/github-app-auth@main
36+
with:
37+
app-id: ${{ secrets.AUTOMATION_GITHUB_APP_ID }}
38+
private-key: ${{ secrets.AUTOMATION_GITHUB_APP_PRIVATE_KEY }}
39+
3340
- name: Checkout
3441
uses: actions/checkout@v4
3542
with:
3643
fetch-depth: 0
44+
token: ${{ steps.auth.outputs.token }}
3745

3846
- name: Install mise
3947
uses: jdx/mise-action@v2
@@ -46,11 +54,20 @@ jobs:
4654

4755
- name: Configure git
4856
run: |
49-
git config user.name "github-actions[bot]"
50-
git config user.email "github-actions[bot]@users.noreply.github.com"
5157
git branch --set-upstream-to=origin/main main 2>/dev/null || true
5258
59+
- name: Debug release-it state
60+
run: |
61+
echo "=== Current version ==="
62+
node -p "require('./package.json').version"
63+
echo ""
64+
echo "=== Latest tags ==="
65+
git tag --sort=-v:refname | head -10 || echo "No tags found"
66+
echo ""
67+
echo "=== Increment: ${{ inputs.increment }} ==="
68+
echo "=== Dry run: ${{ inputs.dry-run }} ==="
69+
5370
- name: Release
54-
run: bun run release:ci -- --increment ${{ inputs.increment }} ${{ inputs.dry-run && '--dry-run' || '' }}
71+
run: bun run release:ci -- --increment ${{ inputs.increment }} ${{ inputs.dry-run && '--dry-run' || '' }} --verbose
5572
env:
56-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
73+
GITHUB_TOKEN: ${{ steps.auth.outputs.token }}

.release-it.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
},
3838
"@release-it/bumper": {
3939
"in": "package.json",
40-
"out": ["package.json"]
40+
"out": []
4141
}
4242
}
4343
}

0 commit comments

Comments
 (0)