-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (31 loc) · 981 Bytes
/
push.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
name: npm publish
on:
push:
branches:
- main
# file paths to consider in the event. Optional; defaults to all.
paths:
- package.json
workflow_dispatch:
jobs:
publish:
name: npm publish
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup pnpm
# You may pin to the exact commit or the version.
# uses: pnpm/action-setup@c3b53f6a16e57305370b4ae5a540c2077a1d50dd
uses: pnpm/action-setup@v4
with:
# Version of pnpm to install
version: latest # optional
# Where to store pnpm files
# dest: # optional, default is ~/setup-pnpm
# If specified, run `pnpm install`
run_install: true # optional, default is null
- run: pnpm install
- run: pnpm run build
- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > ~/.npmrc
- run: npm publish --access=public