Skip to content

Commit 4d3d27e

Browse files
committed
Publish to npm via github action
1 parent 0b76fd6 commit 4d3d27e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/release-build.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ jobs:
2121
- name: Checkout
2222
uses: actions/checkout@v4
2323

24+
- uses: actions/setup-node@v3
25+
with:
26+
node-version: 20.x
27+
registry-url: https://registry.npmjs.org
28+
2429
- name: Save yarn cache location to env
2530
run: echo "YARN_CACHE=$(yarn cache dir)" >> $GITHUB_ENV
2631

@@ -49,3 +54,9 @@ jobs:
4954
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5055
with:
5156
is_prerelease: false
57+
58+
- name: Publish to npm
59+
run: yarn publish
60+
if: startsWith(github.ref, 'refs/tags/')
61+
env:
62+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)