-
Notifications
You must be signed in to change notification settings - Fork 47
46 lines (39 loc) · 1.29 KB
/
generate-icon-changeset.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
name: Generate changeset and PR description based on changed icons
on:
push:
branches:
- icon-update-*
paths:
- packages/bezier-icons/icons/*
jobs:
generate-svg:
name: Generate changeset and PR description
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- name: Git Config
run: |
git config --global user.email "[email protected]"
git config --global user.name "ch-builder"
- name: Get PR number
id: pr
run: echo "pull_request_number=$(gh pr view --json number -q .number || echo "")" >> $GITHUB_OUTPUT
- name: Add pr description
run: |
node packages/bezier-icons/scripts/add-pr-description.js ${{ secrets.PERSONAL_ACCESS_TOKEN }} ${{ steps.pr.outputs.pull_request_number }}
- name: Add changeset
run: |
node packages/bezier-icons/scripts/generate-changeset.js
git add .
git commit -m "chore(bezier-icons): add changeset"
git push origin