-
Notifications
You must be signed in to change notification settings - Fork 54
52 lines (46 loc) · 1.36 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
name: Release
on:
push:
branches:
- main
jobs:
release:
name: Create release
outputs:
releases_created: ${{ steps.release.outputs.releases_created }}
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@v1
id: create-iat
with:
app-id: ${{ secrets.RELEASE_GITHUB_APP_ID}}
private-key: ${{ secrets.RELEASE_GITHUB_APP_KEY }}
- uses: googleapis/release-please-action@7987652d64b4581673a76e33ad5e98e3dd56832f # v4
id: release
with:
token: ${{ steps.create-iat.outputs.token }}
publish:
name: Publish to npm
runs-on: ubuntu-latest
needs: release
if: ${{ needs.release.outputs.releases_created == 'true' }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
- uses: actions/setup-node@v4
with:
node-version: "18"
cache: "pnpm"
- run: pnpm install --frozen-lockfile
- name: Configure npm user
run: npm config set "//registry.npmjs.org/:_authToken=${NPM_TOKEN}"
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: pnpm build
- run: pnpm -r publish
actions-timeline:
needs: [publish]
if: ${{ !cancelled() }}
runs-on: ubuntu-latest
steps:
- uses: Kesin11/actions-timeline@da70beff098ff89b15d279e8bf2f60519a8dadd7 # v2