Skip to content

Commit 085af5a

Browse files
authored
Create tag.yml
1 parent 7a110d7 commit 085af5a

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/tag.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Publish to NPM
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish-npm:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-node@v1
13+
with:
14+
node-version: 18
15+
registry-url: https://registry.npmjs.org/
16+
- run: |
17+
npm ci
18+
npm i -g replace-in-files-cli
19+
replace-in-files --string='0.0.0' --replacement='${{ github.event.release.tag_name }}' package.json
20+
npm run build:prepare-publish
21+
npm publish --access=public
22+
env:
23+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

0 commit comments

Comments
 (0)