-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (42 loc) · 1.23 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
name: release
on:
push:
branches:
- main
env:
working-directory: frontend
concurrency: ${{ github.workflow }}-${{ github.ref }}
permissions:
id-token: write
contents: write
packages: write
pull-requests: write
issues: read
jobs:
create_release_pull_request_or_publish:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Create GitHub App Token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.CHANGESET_CI_TRIGGER_APP_ID }}
private-key: ${{ secrets.CHANGESET_CI_TRIGGER_APP_PRIVATE_KEY }}
- uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}
sparse-checkout: |
.github
${{ env.working-directory }}
- uses: ./.github/actions/pnpm-setup
with:
working-directory: ${{ env.working-directory }}
- name: Create Release Pull Request or Publish to npm
uses: changesets/[email protected]
with:
cwd: ${{ env.working-directory }}
publish: pnpm build && pnpm changeset publish
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}