new: README.md; fix: workflow file #4
This file contains hidden or 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: Build Iosevka Font | |
| on: | |
| push: | |
| branches: [main] | |
| tags: # Trigger on any tag push (e.g., "v1.0.0") | |
| - 'v*' # Only tags starting with 'v' (semantic versioning) | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # Required for releases | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| with: | |
| path: config-repo | |
| fetch-depth: 0 # Needed for git describe | |
| - name: Clone Iosevka repository | |
| run: | | |
| git clone --depth 1 https://github.com/be5invis/Iosevka.git iosevka | |
| - name: Copy custom config | |
| run: | | |
| cp config-repo/Terminality.toml iosevka/private-build-plans.toml | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| build-essential \ | |
| libfreetype6-dev \ | |
| libfontconfig1-dev \ | |
| libpng-dev \ | |
| libjpeg-dev \ | |
| python3 \ | |
| ttfautohint \ | |
| git \ | |
| nodejs \ | |
| npm | |
| - name: Install npm dependencies & build font | |
| run: | | |
| cd iosevka | |
| npm install | |
| npm run build -- ttf::Terminality --jCmd=4 | |
| - name: Package fonts | |
| run: | | |
| cd iosevka | |
| zip -r $GITHUB_WORKSPACE/Terminality.zip ./dist/* | |
| - name: Upload artifact (for non-tag builds) | |
| if: github.ref_name != '' && !startsWith(github.ref, 'refs/tags/') # Skip for tags | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Terminality | |
| path: Terminality.zip | |
| - name: Create Release | |
| if: startsWith(github.ref, 'refs/tags/') # Only run for tags | |
| id: create_release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: Release ${{ github.ref_name }} | |
| body: | | |
| ## 📦 Terminality Font Release | |
| *Auto-generated by [GitHub Actions](https://github.com/ogswag/Terminality/actions)* | |
| files: | | |
| ${{ github.workspace }}/Terminality.zip | |
| draft: false | |
| prerelease: ${{ contains(github.ref_name, 'alpha') || contains(github.ref_name, 'beta') }} |