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.
1 parent 16ceed4 commit 0b5a871Copy full SHA for 0b5a871
1 file changed
.github/workflows/publish-npm.yml
@@ -0,0 +1,32 @@
1
+name: Publish to npm
2
+
3
+on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ version:
7
+ description: "Version to publish (e.g. 0.2.4)"
8
+ required: true
9
10
+jobs:
11
+ publish-npm:
12
+ name: Publish to npm
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v4
16
17
+ - uses: actions/setup-node@v4
18
+ with:
19
+ node-version: "20"
20
+ registry-url: "https://registry.npmjs.org"
21
22
+ - name: Set version
23
+ run: |
24
+ jq --arg v "${{ github.event.inputs.version }}" '.version = $v' npm/package.json > /tmp/pkg.json
25
+ mv /tmp/pkg.json npm/package.json
26
+ echo "Publishing npm version ${{ github.event.inputs.version }}"
27
28
+ - name: Publish
29
+ run: npm publish --access public
30
+ working-directory: npm
31
+ env:
32
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
0 commit comments