We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8842762 commit 75e86e8Copy full SHA for 75e86e8
1 file changed
.github/workflows/publish.yml
@@ -0,0 +1,35 @@
1
+name: Publish to npm
2
+
3
+on:
4
+ release:
5
+ types: [created]
6
+ push:
7
+ branches: [master]
8
9
+jobs:
10
+ publish:
11
+ runs-on: ubuntu-latest
12
13
+ steps:
14
+ - name: Checkout code
15
+ uses: actions/checkout@v4
16
17
+ - name: Setup Node.js
18
+ uses: actions/setup-node@v4
19
+ with:
20
+ node-version: '20.x'
21
+ registry-url: 'https://registry.npmjs.org'
22
23
+ - name: Install dependencies
24
+ run: npm ci
25
26
+ - name: Run tests
27
+ run: npm test
28
29
+ - name: Build
30
+ run: npm run build
31
32
+ - name: Publish to npm
33
+ run: npm publish --access public
34
+ env:
35
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
0 commit comments