-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (31 loc) · 906 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
name: publish
on:
workflow_run:
workflows: ["ci"]
branches: [master] # Ensure it only triggers for pushes to master
types:
- completed # Runs only if Workflow A completes successfully
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
# Single deploy job since we're just deploying
npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use PNPM
uses: pnpm/action-setup@v3
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: 20
registry-url: 'https://registry.npmjs.org/'
always-auth: true
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- run: pnpm install
- run: pnpm build
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}