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 fea127f commit ee6fbbcCopy full SHA for ee6fbbc
1 file changed
.github/workflows/publish.yml
@@ -0,0 +1,26 @@
1
+name: Publish to NPM
2
+on:
3
+ release:
4
+ types: [published]
5
+jobs:
6
+ publish:
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - name: Checkout
10
+ uses: actions/checkout@v2
11
+ - name: Setup Node.js
12
+ uses: actions/setup-node@v2
13
+ with:
14
+ node-version: 16
15
+ cache: 'yarn'
16
+ - name: Install dependencies
17
+ run: yarn install --frozen-lockfile
18
+ - name: Get the release tag version
19
+ id: get_version
20
+ run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
21
+ - name: Set package version
22
+ run: yarn version --new-version "${{ steps.get_version.outputs.VERSION }}" --no-git-tag-version
23
+ - name: Publish package
24
+ run: yarn publish --access public
25
+ env:
26
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
0 commit comments