We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8ac4257 + 1c90abb commit 88bff56Copy full SHA for 88bff56
.github/workflows/npm-publish.yml
@@ -0,0 +1,28 @@
1
+name: Publish package to npm
2
+on:
3
+ workflow_dispatch:
4
+ inputs:
5
+ branch:
6
+ description: 'Git branch to build and publish'
7
+ required: true
8
+ default: main
9
+jobs:
10
+ publish:
11
+ runs-on: ubuntu-latest
12
+ permissions:
13
+ contents: read
14
+ id-token: write
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+ with:
18
+ ref: ${{ github.event.inputs.branch }}
19
+ - uses: actions/setup-node@v3
20
21
+ node-version: '20.x'
22
+ registry-url: 'https://registry.npmjs.org'
23
+ - run: npm install -g npm
24
+ - run: npm install
25
+ - run: npm test
26
+ - run: npm publish --provenance --access public
27
+ env:
28
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
0 commit comments