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 0a166c3 commit 38be769Copy full SHA for 38be769
.github/workflows/publish-v1.yml
@@ -0,0 +1,31 @@
1
+name: Publish
2
+
3
+on: registry_package
4
5
+jobs:
6
+ publish:
7
+ name: Publish to npm
8
+ runs-on: ubuntu-latest
9
10
+ steps:
11
+ - name: Checkout
12
+ uses: actions/checkout@v3
13
+ with:
14
+ ref: 'v1'
15
16
+ - name: Setup Node
17
+ uses: actions/setup-node@v3
18
19
+ node-version: '12.x'
20
+ registry-url: 'https://registry.npmjs.org/'
21
22
+ - name: Edit package.json to remove custom registry config
23
+ run: |
24
+ node -p "const pkg = require('./package.json'); \
25
+ delete pkg.publishConfig.registry; \
26
+ JSON.stringify(pkg, null, 2)" > pkg.json && mv pkg.json package.json
27
28
+ - name: Publish package to npm registry
29
+ run: npm publish
30
+ env:
31
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
0 commit comments