Skip to content
This repository was archived by the owner on Jun 10, 2026. It is now read-only.

Commit 569b06b

Browse files
committed
ci(github-packages): use bun for package publish
1 parent 5d25d9d commit 569b06b

1 file changed

Lines changed: 16 additions & 13 deletions

File tree

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2-
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
1+
# This workflow runs with Bun and publishes the package to GitHub Packages when a release is created.
32

4-
name: Node.js Package
3+
name: GitHub Packages
54

65
on:
76
release:
@@ -12,11 +11,11 @@ jobs:
1211
runs-on: ubuntu-latest
1312
steps:
1413
- uses: actions/checkout@v4
15-
- uses: actions/setup-node@v4
14+
- uses: oven-sh/setup-bun@v2
1615
with:
17-
node-version: 20
18-
- run: npm ci
19-
- run: npm test
16+
bun-version: latest
17+
- run: bun install --frozen-lockfile
18+
- run: bun test
2019

2120
publish-gpr:
2221
needs: build
@@ -26,11 +25,15 @@ jobs:
2625
packages: write
2726
steps:
2827
- uses: actions/checkout@v4
29-
- uses: actions/setup-node@v4
28+
- uses: oven-sh/setup-bun@v2
3029
with:
31-
node-version: 20
32-
registry-url: https://npm.pkg.github.com/
33-
- run: npm ci
34-
- run: npm publish
30+
bun-version: latest
31+
- run: bun install --frozen-lockfile
32+
- name: Configure GitHub Packages authentication
33+
run: |
34+
printf '%s\n' "@rewritetoday:registry=https://npm.pkg.github.com" "//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}" > ~/.npmrc
3535
env:
36-
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
- run: bun publish --registry https://npm.pkg.github.com/
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)