Skip to content

Commit 896d8df

Browse files
authored
chore: add release action (#44)
1 parent f054ad5 commit 896d8df

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "**.**.**"
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v2
14+
with:
15+
persist-credentials: false
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v1
18+
with:
19+
node-version: '20.x'
20+
registry-url: 'https://registry.npmjs.org'
21+
- run: yarn
22+
- run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
23+
- run: npm version $VERSION --git-tag-version=false --allow-same-version
24+
- run: yarn pre-release
25+
- run: npm publish
26+
working-directory: dist
27+
env:
28+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)