-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (35 loc) · 929 Bytes
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Publish to npm
on:
release:
types: [created]
jobs:
publish:
name: 📦 Publish NPM
runs-on: ubuntu-latest
steps:
- name: 🛑 Cancel Previous Runs
uses: styfle/[email protected]
- name: ⬇️ Checkout repo
uses: actions/checkout@v3
- name: 🛠 Setup node
uses: actions/setup-node@v3
with:
node-version: '16.x'
always-auth: true
registry-url: 'https://registry.npmjs.org'
- uses: pnpm/action-setup@v2
name: 📥 Download deps
with:
version: 8
run_install: true
- name: 🧪 Test
run: pnpm test
env:
AWS_ACCESS_KEY_ID: 'test'
AWS_SECRET_ACCESS_KEY: 'test'
- name: 🏗 Build
run: pnpm build
- name: 📢 Publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}