diff --git a/.github/workflows/generate-fonts-release.yml b/.github/workflows/generate-fonts-release.yml new file mode 100644 index 0000000..9043074 --- /dev/null +++ b/.github/workflows/generate-fonts-release.yml @@ -0,0 +1,230 @@ +# 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: + build: + runs-on: ubuntu-latest + continue-on-error: true + + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + - 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 SC + run: | + CONFIG=./config_mincho_single.json poetry run driver ./glyphwiki_dump/dump_newest_only.txt ./glyphwiki_mincho.txt ./perl-scripts g + shopt -s extglob + zip HanaMinLiteSC.zip {Hana*.!(*@(otf|zip)),GlyphWiki*} + rm {Hana*.!(*@(otf|zip)),GlyphWiki*} + + - name: Mincho CJK SC + run: | + CONFIG=./config_mincho.json poetry run driver ./glyphwiki_dump/dump_newest_only.txt ./glyphwiki_mincho.txt ./perl-scripts g + shopt -s extglob + zip HanaMinLiteCJKSC.zip {Hana*.!(*@(otf|zip)),GlyphWiki*} + rm {Hana*.!(*@(otf|zip)),GlyphWiki*} + + - name: Gothic SC + run: | + CONFIG=./config_gothic_single.json poetry run driver ./glyphwiki_dump/dump_newest_only.txt ./glyphwiki_gothic.txt ./perl-scripts g + shopt -s extglob + zip HanaGothLiteSC.zip {Hana*.!(*@(otf|zip)),GlyphWiki*} + rm {Hana*.!(*@(otf|zip)),GlyphWiki*} + + - name: Gothic CJK SC + run: | + CONFIG=./config_gothic.json poetry run driver ./glyphwiki_dump/dump_newest_only.txt ./glyphwiki_gothic.txt ./perl-scripts g + shopt -s extglob + zip HanaGothLiteCJKSC.zip {Hana*.!(*@(otf|zip)),GlyphWiki*} + rm {Hana*.!(*@(otf|zip)),GlyphWiki*} + + - name: Mincho TC + run: | + CONFIG=./config_mincho_single.json poetry run driver ./glyphwiki_dump/dump_newest_only.txt ./glyphwiki_mincho.txt ./perl-scripts t + shopt -s extglob + zip HanaMinLiteTC.zip {Hana*.!(*@(otf|zip)),GlyphWiki*} + rm {Hana*.!(*@(otf|zip)),GlyphWiki*} + + - name: Mincho CJK TC + run: | + CONFIG=./config_mincho.json poetry run driver ./glyphwiki_dump/dump_newest_only.txt ./glyphwiki_mincho.txt ./perl-scripts t + shopt -s extglob + zip HanaMinLiteCJKTC.zip {Hana*.!(*@(otf|zip)),GlyphWiki*} + rm {Hana*.!(*@(otf|zip)),GlyphWiki*} + + - name: Gothic TC + run: | + CONFIG=./config_gothic_single.json poetry run driver ./glyphwiki_dump/dump_newest_only.txt ./glyphwiki_gothic.txt ./perl-scripts t + shopt -s extglob + zip HanaGothLiteTC.zip {Hana*.!(*@(otf|zip)),GlyphWiki*} + rm {Hana*.!(*@(otf|zip)),GlyphWiki*} + + - name: Gothic CJK TC + run: | + CONFIG=./config_gothic.json poetry run driver ./glyphwiki_dump/dump_newest_only.txt ./glyphwiki_gothic.txt ./perl-scripts t + shopt -s extglob + zip HanaGothLiteCJKTC.zip {Hana*.!(*@(otf|zip)),GlyphWiki*} + rm {Hana*.!(*@(otf|zip)),GlyphWiki*} + + - name: Mincho HK + run: | + CONFIG=./config_mincho_single.json poetry run driver ./glyphwiki_dump/dump_newest_only.txt ./glyphwiki_mincho.txt ./perl-scripts h + shopt -s extglob + zip HanaMinLiteHK.zip {Hana*.!(*@(otf|zip)),GlyphWiki*} + rm {Hana*.!(*@(otf|zip)),GlyphWiki*} + + - name: Mincho CJK HK + run: | + CONFIG=./config_mincho.json poetry run driver ./glyphwiki_dump/dump_newest_only.txt ./glyphwiki_mincho.txt ./perl-scripts h + shopt -s extglob + zip HanaMinLiteCJKHK.zip {Hana*.!(*@(otf|zip)),GlyphWiki*} + rm {Hana*.!(*@(otf|zip)),GlyphWiki*} + + - name: Gothic HK + run: | + CONFIG=./config_gothic_single.json poetry run driver ./glyphwiki_dump/dump_newest_only.txt ./glyphwiki_gothic.txt ./perl-scripts h + shopt -s extglob + zip HanaGothLiteHK.zip {Hana*.!(*@(otf|zip)),GlyphWiki*} + rm {Hana*.!(*@(otf|zip)),GlyphWiki*} + + - name: Gothic CJK HK + run: | + CONFIG=./config_gothic.json poetry run driver ./glyphwiki_dump/dump_newest_only.txt ./glyphwiki_gothic.txt ./perl-scripts h + shopt -s extglob + zip HanaGothLiteCJKHK.zip {Hana*.!(*@(otf|zip)),GlyphWiki*} + rm {Hana*.!(*@(otf|zip)),GlyphWiki*} + + - name: Mincho JP + run: | + CONFIG=./config_mincho_single.json poetry run driver ./glyphwiki_dump/dump_newest_only.txt ./glyphwiki_mincho.txt ./perl-scripts j + shopt -s extglob + zip HanaMinLiteJP.zip {Hana*.!(*@(otf|zip)),GlyphWiki*} + rm {Hana*.!(*@(otf|zip)),GlyphWiki*} + + - name: Mincho CJK JP + run: | + CONFIG=./config_mincho.json poetry run driver ./glyphwiki_dump/dump_newest_only.txt ./glyphwiki_mincho.txt ./perl-scripts j + shopt -s extglob + zip HanaMinLiteCJKJP.zip {Hana*.!(*@(otf|zip)),GlyphWiki*} + rm {Hana*.!(*@(otf|zip)),GlyphWiki*} + + - name: Gothic JP + run: | + CONFIG=./config_gothic_single.json poetry run driver ./glyphwiki_dump/dump_newest_only.txt ./glyphwiki_gothic.txt ./perl-scripts j + shopt -s extglob + zip HanaGothLiteJP.zip {Hana*.!(*@(otf|zip)),GlyphWiki*} + rm {Hana*.!(*@(otf|zip)),GlyphWiki*} + + - name: Gothic CJK JP + run: | + CONFIG=./config_gothic.json poetry run driver ./glyphwiki_dump/dump_newest_only.txt ./glyphwiki_gothic.txt ./perl-scripts j + shopt -s extglob + zip HanaGothLiteCJKJP.zip {Hana*.!(*@(otf|zip)),GlyphWiki*} + rm {Hana*.!(*@(otf|zip)),GlyphWiki*} + + - name: Mincho KR + run: | + CONFIG=./config_mincho_single.json poetry run driver ./glyphwiki_dump/dump_newest_only.txt ./glyphwiki_mincho.txt ./perl-scripts k + shopt -s extglob + zip HanaMinLiteKR.zip {Hana*.!(*@(otf|zip)),GlyphWiki*} + rm {Hana*.!(*@(otf|zip)),GlyphWiki*} + + - name: Mincho CJK KR + run: | + CONFIG=./config_mincho.json poetry run driver ./glyphwiki_dump/dump_newest_only.txt ./glyphwiki_mincho.txt ./perl-scripts k + shopt -s extglob + zip HanaMinLiteCJKKR.zip {Hana*.!(*@(otf|zip)),GlyphWiki*} + rm {Hana*.!(*@(otf|zip)),GlyphWiki*} + + - name: Gothic KR + run: | + CONFIG=./config_gothic_single.json poetry run driver ./glyphwiki_dump/dump_newest_only.txt ./glyphwiki_gothic.txt ./perl-scripts k + shopt -s extglob + zip HanaGothLiteKR.zip {Hana*.!(*@(otf|zip)),GlyphWiki*} + rm {Hana*.!(*@(otf|zip)),GlyphWiki*} + + - name: Gothic CJK KR + run: | + CONFIG=./config_gothic.json poetry run driver ./glyphwiki_dump/dump_newest_only.txt ./glyphwiki_gothic.txt ./perl-scripts k + shopt -s extglob + zip HanaGothLiteCJKKR.zip {Hana*.!(*@(otf|zip)),GlyphWiki*} + rm {Hana*.!(*@(otf|zip)),GlyphWiki*} + + - name: Mincho VN + run: | + CONFIG=./config_mincho_single.json poetry run driver ./glyphwiki_dump/dump_newest_only.txt ./glyphwiki_mincho.txt ./perl-scripts v + shopt -s extglob + zip HanaMinLiteVN.zip {Hana*.!(*@(otf|zip)),GlyphWiki*} + rm {Hana*.!(*@(otf|zip)),GlyphWiki*} + + - name: Mincho CJK VN + run: | + CONFIG=./config_mincho.json poetry run driver ./glyphwiki_dump/dump_newest_only.txt ./glyphwiki_mincho.txt ./perl-scripts v + shopt -s extglob + zip HanaMinLiteCJKVN.zip {Hana*.!(*@(otf|zip)),GlyphWiki*} + rm {Hana*.!(*@(otf|zip)),GlyphWiki*} + + - name: Gothic VN + run: | + CONFIG=./config_gothic_single.json poetry run driver ./glyphwiki_dump/dump_newest_only.txt ./glyphwiki_gothic.txt ./perl-scripts v + shopt -s extglob + zip HanaGothLiteVN.zip {Hana*.!(*@(otf|zip)),GlyphWiki*} + rm {Hana*.!(*@(otf|zip)),GlyphWiki*} + + - name: Gothic CJK VN + run: | + CONFIG=./config_gothic.json poetry run driver ./glyphwiki_dump/dump_newest_only.txt ./glyphwiki_gothic.txt ./perl-scripts v + shopt -s extglob + zip HanaGothLiteCJKVN.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 }}