Build Millennium Code #23
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 Millennium Code | |
| on: | |
| workflow_dispatch: # Manual trigger | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Fetch Latest Iosevka Release | |
| id: fetch-release | |
| run: | | |
| latest_release=$(curl -s https://api.github.com/repos/be5invis/Iosevka/releases/latest | jq -r .tag_name) | |
| echo "release=${latest_release}" >> $GITHUB_OUTPUT | |
| - name: Set up Bun | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Cache Docker Layers | |
| uses: actions/cache@v4 | |
| with: | |
| path: /tmp/.buildx-cache | |
| key: ${{ runner.os }}-buildx-bun-${{ hashFiles('docker/Dockerfile', 'docker/build.sh') }} | |
| restore-keys: | | |
| ${{ runner.os }}-buildx-bun- | |
| - name: Build Docker Image with Bun | |
| run: | | |
| DOCKER_BUILDKIT=1 docker buildx build \ | |
| --cache-from type=local,src=/tmp/.buildx-cache \ | |
| --cache-to type=local,dest=/tmp/.buildx-cache-new,mode=max \ | |
| --load \ | |
| -t fontcc \ | |
| docker/ | |
| - name: Move Docker Cache | |
| run: | | |
| rm -rf /tmp/.buildx-cache | |
| mv /tmp/.buildx-cache-new /tmp/.buildx-cache | |
| - name: Build Fonts with Bun | |
| run: | | |
| docker run --rm \ | |
| -v ${{ github.workspace }}:/work \ | |
| -e VERSION_TAG=${{ steps.fetch-release.outputs.release }} \ | |
| fontcc ttf::MillenniumCode | |
| - name: Adjust Permissions | |
| run: | | |
| sudo chmod -R 755 dist | |
| - name: Archive Fonts | |
| run: | | |
| zip -r Millennium_Code-Fonts-${{ github.run_id }}.zip dist/MillenniumCode/TTF/* | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: "v${{ github.run_id }}" | |
| name: "Millennium Code Release ${{ github.run_id }}" | |
| body: | | |
| Millennium Code fonts built from the latest Iosevka release (${{ steps.fetch-release.outputs.release }}). | |
| draft: false | |
| prerelease: false | |
| files: Millennium_Code-Fonts-${{ github.run_id }}.zip | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |