-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (38 loc) · 1.39 KB
/
pull-request.yaml
File metadata and controls
40 lines (38 loc) · 1.39 KB
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
name: pull-request
on:
- pull_request
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
permissions:
contents: read
jobs:
update-changelog:
runs-on: ubuntu-latest
steps:
- uses: actions/create-github-app-token@7bd03711494f032dfa3be3558f7dc8787b0be333 # v3
id: app-token
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
token: ${{ steps.app-token.outputs.token }}
- uses: asdf-vm/actions/install@b7bcd026f18772e44fe1026d729e1611cc435d47 # v4
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v5
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
with:
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm exec commitlint --verbose --from="remotes/origin/$GITHUB_BASE_REF"
- name: update changelog
run: |
pnpm exec git-cliff -o
pnpm exec prettier --write CHANGELOG.md
git add CHANGELOG.md
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
if git commit -m 'chore: update changelog'; then
git push origin
fi