There was an error while loading. Please reload this page.
1 parent 3776dbd commit b35f74cCopy full SHA for b35f74c
1 file changed
.github/workflows/publish-to-npm-registry.yml
@@ -0,0 +1,40 @@
1
+name: Publish to npm registry
2
+
3
+on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
8
+env:
9
+ BUN_VERSION: "latest"
10
11
+permissions:
12
+ contents: read
13
+ id-token: write
14
15
+jobs:
16
+ npm-publish:
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - uses: actions/checkout@v4
20
21
+ - name: Setup Bun
22
+ uses: oven-sh/setup-bun@v2
23
+ with:
24
+ bun-version: ${{ env.BUN_VERSION }}
25
26
+ - name: Install dependencies
27
+ run: bun install --frozen-lockfile
28
29
+ - name: Run tests
30
+ run: bun run test
31
32
+ - name: Run checks
33
+ run: bun run check
34
35
+ - name: Publish to NPM
36
+ run: |
37
+ echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
38
+ npm publish --access public --provenance
39
+ env:
40
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
0 commit comments