Skip to content

Commit f2167dc

Browse files
committed
ci: add action to publish package on release creation
1 parent 151b5df commit f2167dc

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/publish.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Publish Package
2+
on:
3+
release:
4+
types: [created]
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout the repository
10+
uses: actions/checkout@v2
11+
- name: Install pnpm
12+
uses: pnpm/action-setup@v2.0.1
13+
with:
14+
version: 6
15+
- name: Install Node.js
16+
uses: actions/setup-node@v2
17+
with:
18+
node-version: 14
19+
cache: 'pnpm'
20+
registry-url: 'https://registry.npmjs.org'
21+
- name: Install dependencies
22+
run: pnpm install
23+
- name: Publish
24+
run: pnpm publish
25+
env:
26+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)