Created
November 9, 2023 06:05
-
-
Save NoahELE/92ea3f4b28f75d7117d5bfd9b9fad6d9 to your computer and use it in GitHub Desktop.
Patch Nerd Fonts with GIthub Actions
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
# Repo: https://github.com/NoahELE/Monocraft-Nerd-Font | |
name: patch-font | |
on: [push] | |
env: | |
FONT_FORGE_URL: https://github.com/fontforge/fontforge/releases/download/20230101/FontForge-2023-01-01-a1dad3e-x86_64.AppImage | |
FONT_FORGE: FontForge.AppImage | |
FONT_PATCHER_URL: https://github.com/ryanoasis/nerd-fonts/releases/download/v3.0.2/FontPatcher.zip | |
FONT_PATCHER: FontPatcher.zip | |
FONT_FILE: Monocraft.ttf | |
jobs: | |
patch-font: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install FontForge | |
run: | | |
wget $FONT_FORGE_URL -O $FONT_FORGE | |
chmod u+x $FONT_FORGE | |
- name: Install FUSE (required to run AppImage) | |
run: | | |
sudo add-apt-repository universe | |
sudo apt install libfuse2 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3 | |
- name: Download and extract patch script | |
run: | | |
wget $FONT_PATCHER_URL -O $FONT_PATCHER | |
unzip $FONT_PATCHER | |
- name: Patch font | |
run: | | |
mkdir patched-font | |
./$FONT_FORGE -script $PWD/font-patcher $PWD/$FONT_FILE -out $PWD/patched-font --complete | |
- name: Upload patched font | |
uses: actions/upload-artifact@v3 | |
with: | |
name: patched-font | |
path: ./patched-font |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Check the repository https://github.com/NoahELE/Monocraft-Nerd-Font
The patched font can be downloaded in Acrtifacts