1
0
Files
readerly/.github/workflows/build.yml

74 lines
1.7 KiB
YAML

name: Build fonts
on:
push:
branches: [main]
tags: ["*"]
jobs:
build:
runs-on: ubuntu-latest
container:
image: ghcr.io/nicoverbruggen/fntbld-oci:latest
steps:
- uses: actions/checkout@v4
- name: Build fonts
run: python3 build.py
- name: Download kobofix.py
run: curl -sL https://raw.githubusercontent.com/nicoverbruggen/kobo-font-fix/main/kobofix.py -o kobofix.py
- name: Generate Kobo (KF) fonts
run: |
python3 kobofix.py --preset kf out/ttf/*.ttf
mkdir -p out/kf
mv out/ttf/KF_*.ttf out/kf/
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: Readerly
path: out/ttf/*.ttf
- name: Upload Kobo artifact
uses: actions/upload-artifact@v4
with:
name: Kobo_Readerly
path: out/kf/*.ttf
- name: Zip TTFs for release
if: startsWith(github.ref, 'refs/tags/')
run: |
cd out/ttf && zip -j ../../Readerly.zip *.ttf
cd ../../out/kf && zip -j ../../Kobo_Readerly.zip *.ttf
- name: Upload release zips
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-artifact@v4
with:
name: Readerly-release
path: |
Readerly.zip
Kobo_Readerly.zip
release:
needs: build
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with:
name: Readerly-release
- name: Create release
uses: softprops/action-gh-release@v2
with:
files: |
Readerly.zip
Kobo_Readerly.zip