-
Notifications
You must be signed in to change notification settings - Fork 72
80 lines (66 loc) · 2.04 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: New release
on:
push:
branches:
- main
jobs:
release:
name: Release
runs-on: ubuntu-latest
outputs:
releases_created: ${{ steps.release.outputs.releases_created }}
steps:
- name: Release
id: release
uses: google-github-actions/release-please-action@v3
with:
command: manifest
release-type: node
publish:
needs: release
name: Publish
runs-on: ubuntu-latest
if: ${{ needs.release.outputs.releases_created }}
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v4
with:
version: 9.12.2
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'pnpm'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm build
- name: Publish
run: pnpm publish -r --report-summary
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
publish-github:
needs: release
name: Publish
runs-on: ubuntu-latest
if: ${{ needs.release.outputs.releases_created }}
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v4
with:
version: 8
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'pnpm'
registry-url: 'https://npm.pkg.github.com'
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm build
- name: Publish
run: pnpm publish -r --report-summary
env:
NODE_AUTH_TOKEN: ${{secrets.GIT_HUB_TOKEN}}