-
Notifications
You must be signed in to change notification settings - Fork 1
30 lines (29 loc) · 957 Bytes
/
release.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
name: NPM Release
on:
push:
branches: [main]
jobs:
release:
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: pnpm/[email protected]
with:
version: latest
run_install: |
args: [--no-frozen-lockfile, --strict-peer-dependencies]
- run: mkdir ./data && git fetch origin && git --work-tree=./data checkout origin/gh-pages -- . && git reset
- name: Set publishing config
run: pnpm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}"
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- run: pnpx zardoy-release npm
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: data
force_orphan: true