Font Build + Patch to Repository Release #40
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Font Build + Patch to Repository Release | |
on: | |
workflow_dispatch: | |
jobs: | |
font-build-patch: | |
name: Font Build + Patch | Iosevka & Nerd Fonts | |
runs-on: ubuntu-latest | |
steps: | |
- name: Step 1 | Setup Node.js | |
uses: actions/setup-node@v4 | |
- name: Step 2 | Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
# NOTE: Reference for repository to use for installing FontForge: https://askubuntu.com/questions/1058055/how-do-i-install-fontforge-on-kubuntu-18-04 | |
- name: Step 3 | Setup FontForge | |
run: | | |
sudo add-apt-repository universe | |
sudo apt-get update | |
sudo apt-get install fontforge python3-fontforge | |
- name: Step 4 | Main Repository Checkout | |
uses: actions/checkout@v4 | |
with: | |
sparse-checkout: | | |
font/private-build-plans.toml | |
sparse-checkout-cone-mode: false | |
- name: Step 5 | Font (Iosevka) Repository Checkout | |
uses: actions/checkout@v4 | |
with: | |
path: font-build | |
repository: be5invis/Iosevka | |
fetch-depth: 1 | |
- name: Step 6 | Install Iosevka Dependencies | |
working-directory: font-build | |
run: | | |
npm install | |
npm install ttfautohint | |
- name: Step 7 | Font Patcher Repository Checkout | |
uses: actions/checkout@v4 | |
with: | |
path: font-patch | |
repository: ryanoasis/nerd-fonts | |
sparse-checkout: | | |
bin | |
src/glyphs | |
font-patcher | |
sparse-checkout-cone-mode: false | |
- name: Step 8.A | Pre-Build Font (Prep-work) | |
working-directory: font-build | |
run: | | |
mv ../font/private-build-plans.toml ./ | |
- name: Step 8.B | Actual Build Font | |
working-directory: font-build | |
run: | | |
npm run build -- ttf::IosevkaCodexLink | |
- name: Step 8.C | Post-Build Font (Clean-up) | |
working-directory: font-build | |
run: | | |
mv ./dist/IosevkaCodexLink/TTF/ ../font-patch/font-dist-ttf | |
mkdir ../font-patch/font-dist-ttf/original | |
mkdir ../font-patch/font-dist-tff/patched | |
mv ../font-patch/font-dist-ttf/*.ttf ../font-patch/font-dist-ttf/original | |
- name: Step 9.A | Pre-Patch Font (Prep-work) | |
run: unset LD_LIBRARY_PATH | |
# NOTE: Reference for fix in regards to missing Base Library: https://github.com/indygreg/PyOxidizer/issues/406 | |
- name: Step 9.B | Actual Patch Font | |
working-directory: font-patch | |
shell: bash | |
run: | | |
for i in font-dist-ttf/original/*.ttf; do fontforge -script ./font-patcher $i --complete --mono --outputdir font-dist-ttf/patched; done | |
ls | |
ls font-dist-ttf | |
- name: Step 9.C | Post-Patch Font (Publish Release) | |
uses: softprops/action-gh-release@v2 | |
with: | |
prerelease: true | |
files: font-patch/font-dist-ttf/** |