-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (56 loc) · 1.85 KB
/
generate_icon_font.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Generate and commit icon-font and code from temaki SVG icon files
on:
# Allow running this workflow manually from the Actions tab.
workflow_dispatch:
env:
TEMAKI_VERSION_TAG: 'v5.9.0'
# Allow only one concurrent workflow
concurrency:
group: "file_generation"
cancel-in-progress: true
jobs:
build_icon_font:
runs-on: ubuntu-latest
steps:
- name: Checkout Temaki repository
uses: actions/checkout@v3
with:
repository: ideditor/temaki
ref: ${{ env.TEMAKI_VERSION_TAG }}
path: temaki
- name: Setup NodeJS
uses: actions/setup-node@v3
- name: Install Fantasticon - icon-font generation package
run: npm install -g fantasticon
- name: Generate icon-font
run: >-
fantasticon temaki/icons
--output .
--name temaki_flutter
--font-types ttf
--asset-types json
--normalize
- name: Checkout temaki_flutter repository
uses: actions/checkout@v3
with:
path: temaki_flutter
- name: Create required directories (if missing)
run: mkdir -p temaki_flutter/lib/fonts;
- name: Move font to repository
run: mv -f temaki_flutter.ttf temaki_flutter/lib/fonts
- name: Move json to repository
run: mv -f temaki_flutter.json temaki_flutter/lib
- name: Setup Flutter SDK
uses: subosito/flutter-action@v2.8.0
- name: Get pub dependencies
working-directory: temaki_flutter
run: flutter pub get
- name: Generate Flutter icon class file
working-directory: temaki_flutter
run: dart run build_runner build --delete-conflicting-outputs
- name: Add & Commit to repository
uses: EndBug/add-and-commit@v9.1.1
with:
cwd: temaki_flutter
add: lib/fonts/temaki_flutter.ttf lib/temaki_flutter.dart
message: 'Update icon font and icon class'