-
Notifications
You must be signed in to change notification settings - Fork 2
123 lines (110 loc) · 4 KB
/
generate-fonts-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
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Generate Fonts (Release)
on:
push:
tags:
- "release-*"
jobs:
# fetch_dump_and_svg_font:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - run: sudo apt install wget
# - run: sh fetch_dump.sh
# - run: sh fetch_svg_font.sh
# - run: gzip -d *.txt.gz
# - uses: actions/upload-artifact@master
# with:
# name: raw-data
# path: |
# ./glyphwiki_*.txt
# ./glyphwiki_dump/
build-otf:
# needs: ["fetch_dump_and_svg_font"]
runs-on: ubuntu-latest
continue-on-error: true
strategy:
fail-fast: false
matrix:
include:
- suffix: SC
locale: g
- suffix: TC
locale: t
- suffix: HK
locale: h
- suffix: JP
locale: j
- suffix: KR
locale: k
- suffix: VN
locale: v
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
# - uses: actions/download-artifact@v2
# with:
# name: raw-data
- run: sudo apt install wget
- name: Set up Python 3.9.x
uses: actions/setup-python@v2
with:
python-version: 3.9.x
- uses: shogo82148/actions-setup-perl@v1
with:
perl-version: "5.32"
- name: Install Poetry
uses: snok/install-poetry@v1.1.1
- name: Cache Poetry virtualenv
uses: actions/cache@v1
id: cache
with:
path: ~/.virtualenvs
key: poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
poetry-${{ hashFiles('**/poetry.lock') }}
- name: Set Poetry config
run: |
poetry config virtualenvs.in-project false
poetry config virtualenvs.path ~/.virtualenvs
- name: Install Dependencies
run: poetry install
if: steps.cache.outputs.cache-hit != 'true'
- run: sh fetch_dump.sh
- run: sh fetch_svg_font.sh
- run: gzip -d *.txt.gz
- name: Mincho ${{ matrix.suffix }}
run: |
CONFIG=./config_mincho_single.json poetry run driver ./glyphwiki_dump/dump_newest_only.txt ./glyphwiki_mincho.txt ./perl-scripts ${{ matrix.locale }}
shopt -s extglob
zip HanaMinLite${{ matrix.suffix }}.zip {Hana*.!(*@(otf|zip)),GlyphWiki*}
rm {Hana*.!(*@(otf|zip)),GlyphWiki*}
- name: Mincho CJK ${{ matrix.suffix }}
run: |
CONFIG=./config_mincho.json poetry run driver ./glyphwiki_dump/dump_newest_only.txt ./glyphwiki_mincho.txt ./perl-scripts ${{ matrix.locale }}
shopt -s extglob
zip HanaMinLiteCJK${{ matrix.suffix }}.zip {Hana*.!(*@(otf|zip)),GlyphWiki*}
rm {Hana*.!(*@(otf|zip)),GlyphWiki*}
- name: Gothic ${{ matrix.suffix }}
run: |
CONFIG=./config_gothic_single.json poetry run driver ./glyphwiki_dump/dump_newest_only.txt ./glyphwiki_gothic.txt ./perl-scripts ${{ matrix.locale }}
shopt -s extglob
zip HanaGothLite${{ matrix.suffix }}.zip {Hana*.!(*@(otf|zip)),GlyphWiki*}
rm {Hana*.!(*@(otf|zip)),GlyphWiki*}
- name: Gothic CJK ${{ matrix.suffix }}
run: |
CONFIG=./config_gothic.json poetry run driver ./glyphwiki_dump/dump_newest_only.txt ./glyphwiki_gothic.txt ./perl-scripts ${{ matrix.locale }}
shopt -s extglob
zip HanaGothLiteCJK${{ matrix.suffix }}.zip {Hana*.!(*@(otf|zip)),GlyphWiki*}
rm {Hana*.!(*@(otf|zip)),GlyphWiki*}
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
*.otf
*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}