Skip to content

Commit e8e9a96

Browse files
runningcodeclaude
andauthored
ci(build): Publish snapshots to GitHub Releases instead of npm (#3226)
## Summary - Replace `publish-npm` job with `publish-github-release` that uploads platform binaries as prerelease GitHub Release assets - Remove `packages: write` permission (no longer publishing to npm) - No new secrets needed — `github.token` with `contents: write` handles `gh release create` 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 04366e0 commit e8e9a96

1 file changed

Lines changed: 17 additions & 30 deletions

File tree

.github/workflows/snapshot.yml

Lines changed: 17 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ on:
66

77
permissions:
88
contents: write
9-
packages: write
109

1110
jobs:
1211
prepare:
@@ -67,46 +66,34 @@ jobs:
6766
checkout-ref: ${{ needs.prepare.outputs.ref }}
6867
secrets: inherit
6968

70-
publish-npm:
71-
name: Publish to npm
69+
publish-github-release:
70+
name: Publish GitHub Release
7271
needs: [prepare, build]
7372
runs-on: ubuntu-24.04
7473
steps:
75-
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # 6.2.0
76-
with:
77-
node-version: '20.10.0'
78-
registry-url: 'https://registry.npmjs.org'
79-
80-
- name: Download npm binary distributions
74+
- name: Download binaries
8175
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # 8.0.0
8276
with:
83-
name: artifact-npm-binary-distributions
84-
path: npm-distributions
77+
pattern: artifact-bin-*
78+
merge-multiple: true
8579

86-
- name: Download node package
87-
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # 8.0.0
88-
with:
89-
name: artifact-pkg-node
90-
path: node-package
91-
92-
- name: Publish platform packages
80+
- name: Create GitHub Release
9381
env:
94-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
95-
run: |
96-
for pkg in npm-distributions/*/*.tgz; do
97-
echo "Publishing $pkg"
98-
npm publish "$pkg" --tag snapshot
99-
done
100-
101-
- name: Publish main package
102-
env:
103-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
82+
GH_TOKEN: ${{ github.token }}
83+
GH_REPO: ${{ github.repository }}
84+
VERSION: ${{ needs.prepare.outputs.version }}
85+
REF: ${{ needs.prepare.outputs.ref }}
10486
run: |
105-
npm publish node-package/*.tgz --tag snapshot
87+
gh release create "$VERSION" \
88+
--target "$REF" \
89+
--prerelease \
90+
--title "$VERSION" \
91+
--notes "Snapshot build from master at ${VERSION##*.}." \
92+
sentry-cli-*
10693
10794
cleanup:
10895
name: Cleanup
109-
needs: [prepare, publish-npm]
96+
needs: [prepare, publish-github-release]
11097
if: always()
11198
runs-on: ubuntu-24.04
11299
steps:

0 commit comments

Comments
 (0)