Skip to content

Commit 33dd618

Browse files
committed
fix(ci): simplify npm publishing workflow
- Use direct npm publish instead of custom script - Setup ~/.npmrc in GitHub Actions (standard approach) - Add smoke test before publishing (--version check) - Remove complex npmrc creation logic - Cleaner, more maintainable workflow
1 parent 9010062 commit 33dd618

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

.github/workflows/build-binaries.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,20 @@ jobs:
6666
name: ${{ matrix.slug }}
6767
path: binaries/${{ matrix.slug }}
6868

69+
- name: Setup npm auth
70+
if: startsWith(github.ref, 'refs/tags/v')
71+
run: |
72+
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
73+
74+
- name: Smoke test platform binary
75+
shell: bash
76+
run: |
77+
chmod +x binaries/${{ matrix.slug }}/codemachine* || true
78+
binaries/${{ matrix.slug }}/codemachine --version
79+
6980
- name: Publish platform package to npm
7081
if: startsWith(github.ref, 'refs/tags/v')
71-
env:
72-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
73-
CI: true
74-
run: bun scripts/publish-platform.mjs --tag latest --access public
82+
shell: bash
83+
run: |
84+
cd binaries/${{ matrix.slug }}
85+
npm publish --access public --tag latest

0 commit comments

Comments
 (0)