Skip to content

Commit d6f1ce0

Browse files
committed
add github workflow
1 parent 46b14b8 commit d6f1ce0

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

.github/workflows/npm-publish.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
- name: Get tag version
2+
if: startsWith(github.ref, 'refs/tags/')
3+
id: get_tag_version
4+
run: echo ::set-output name=TAG_VERSION::${GITHUB_REF/refs\/tags\//}
5+
- uses: actions/setup-node@v2
6+
with:
7+
node-version: "18.x"
8+
registry-url: "https://registry.npmjs.org"
9+
- name: npm build
10+
run: deno run -A ./scripts/build.ts ${{steps.get_tag_version.outputs.TAG_VERSION}}
11+
- name: npm publish
12+
if: startsWith(github.ref, 'refs/tags/')
13+
env:
14+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
15+
run: cd npm && npm publish

0 commit comments

Comments
 (0)