-
Notifications
You must be signed in to change notification settings - Fork 38
53 lines (42 loc) · 1.33 KB
/
icons.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
name: icons
on:
schedule:
- cron: '0 1 * * 1'
workflow_dispatch:
env:
OUTPUT_ROOT_DIR: packages/icon-files/
jobs:
icons:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: '.node-version'
cache: yarn
- name: Prepare deps
run: |
yarn install --immutable --inline-builds
yarn workspaces foreach -vptR --from @charcoal-ui/icons-cli run build
- name: Export
env:
FIGMA_FILE_URL: ${{ secrets.FIGMA_FILE_URL }}
FIGMA_TOKEN: ${{ secrets.FIGMA_TOKEN }}
run: yarn icons-cli figma:export
- name: Optimize
run: yarn icons-cli svg:optimize --ignoreFile ./misc/icons-cli-denylist
- name: Generate source
run: yarn icons-cli files:generate
- name: Generate github token
id: generate_token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.CHARCOAL_BOT_APP_ID }}
private_key: ${{ secrets.CHARCOAL_BOT_PRIVATE_KEY }}
- name: Create a Pull Request
env:
GITHUB_ACCESS_TOKEN: ${{ steps.generate_token.outputs.token }}
GITHUB_REPO_OWNER: pixiv
GITHUB_REPO_NAME: charcoal
GITHUB_DEFAULT_BRANCH: main
run: yarn icons-cli github:pr