From d81511c3d72e3364346e93e30519a2cd6e5af182 Mon Sep 17 00:00:00 2001 From: Simon Cozens Date: Wed, 20 Mar 2024 08:41:50 +0000 Subject: [PATCH] Build issues etc --- .github/workflows/build.yaml | 120 +++++++++++++++++++++-------------- DESCRIPTION.en_us.html | 12 ---- Makefile | 4 +- OFL.txt | 2 +- requirements.txt | 2 +- sources/TasSh.glyphs | 8 +-- sources/config.yaml | 5 +- 7 files changed, 83 insertions(+), 70 deletions(-) delete mode 100644 DESCRIPTION.en_us.html diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 6585743..6bbee2f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,24 +1,25 @@ name: Build font and specimen -on: [push, release] +on: push jobs: build: + name: Build and test runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python 3.10 - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: "3.10" - - name: Set up latest harfbuzz - uses: notofonts/install-harfbuzz-action@main - name: Install sys tools/deps run: | sudo apt-get update sudo apt-get install ttfautohint sudo snap install yq - - uses: actions/cache@v2 + - name: Set up latest harfbuzz + uses: notofonts/install-harfbuzz-action@main + - uses: actions/cache@v4 with: path: ./venv/ key: ${{ runner.os }}-venv-${{ hashFiles('**/requirements*.txt') }} @@ -29,35 +30,37 @@ jobs: shell: bash # Set the archive name to repo name + "-assets" e.g "MavenPro-assets" run: echo "ZIP_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')-fonts" >> $GITHUB_ENV - # If a new release is cut, use the release tag to auto-bump the source files - - name: Bump release - if: github.event_name == 'release' - run: | - . venv/bin/activate - SRCS=$(yq e ".sources[]" sources/config.yaml) - TAG_NAME=${GITHUB_REF/refs\/tags\//} - echo "Bumping $SRCS to $TAG_NAME" - for src in $SRCS - do - bumpfontversion sources/$src --new-version $TAG_NAME; - done + + # If a new release is cut, use the release tag to auto-bump the source files + # - name: Bump release + # if: github.event_name == 'release' + # run: | + # . venv/bin/activate + # SRCS=$(yq e ".sources[]" sources/config.yaml) + # TAG_NAME=${GITHUB_REF/refs\/tags\//} + # echo "Bumping $SRCS to $TAG_NAME" + # for src in $SRCS + # do + # bumpfontversion sources/$src --new-version $TAG_NAME; + # done + - name: Build font run: make build - name: Check with fontbakery run: make test continue-on-error: true - # - name: proof - # run: make proof - # - name: setup site - # run: cp scripts/index.html out/index.html - # - name: Deploy - # uses: peaceiris/actions-gh-pages@v3 - # if: ${{ github.ref == 'refs/heads/main' }} - # with: - # github_token: ${{ secrets.GITHUB_TOKEN }} - # publish_dir: ./out + #- name: proof + # run: make proof + - name: setup site + run: cp scripts/index.html out/index.html + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + if: ${{ github.ref == 'refs/heads/main' }} + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./out - name: Archive artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: ${{ env.ZIP_NAME }} path: | @@ -65,30 +68,51 @@ jobs: out outputs: zip_name: ${{ env.ZIP_NAME }} + + # There are two ways a release can be created: either by pushing a tag, or by + # creating a release from the GitHub UI. Pushing a tag does not automatically + # create a release, so we have to do that ourselves. However, creating a + # release from the GitHub UI *does* push a tag, and we don't want to create + # a new release in that case because one already exists! + release: - # only run if the commit is tagged... - if: github.event_name == 'release' - # ... and it builds successfully - needs: - - build + name: Create and populate release + needs: build runs-on: ubuntu-latest + if: contains(github.ref, 'refs/tags/') env: ZIP_NAME: ${{ needs.build.outputs.zip_name }} + GH_TOKEN: ${{ github.token }} steps: - - uses: actions/checkout@v2 - - name: Download artefact files - uses: actions/download-artifact@v2 + - uses: actions/checkout@v4 + - name: Download font artefact files + uses: actions/download-artifact@v4 with: name: ${{ env.ZIP_NAME }} path: ${{ env.ZIP_NAME }} - - name: Zip files - run: zip -r ${{ env.ZIP_NAME }}.zip ${{ env.ZIP_NAME }} - - name: Upload binaries to release - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: ${{ env.ZIP_NAME }}.zip - asset_name: ${{ env.ZIP_NAME }}.zip - tag: ${{ github.ref }} - overwrite: true - body: "Production ready fonts" + - name: Copy DESCRIPTION.en_us.html to artefact directory + run: cp documentation/DESCRIPTION.en_us.html ${{ env.ZIP_NAME }}/DESCRIPTION.en_us.html + - name: Copy ARTICLE.en_us.html to artefact directory + run: cp documentation/ARTICLE.en_us.html ${{ env.ZIP_NAME }}/ARTICLE.en_us.html + continue-on-error: true + - name: Copy OFL.txt to artefact directory + run: cp OFL.txt ${{ env.ZIP_NAME }}/OFL.txt + - name: Remove proof/fontbakery stuff from release + run: rm -rf ${{ env.ZIP_NAME }}/out + - name: gen release file name + shell: bash + run: echo "RELEASE_ZIP_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')-${{github.ref_name}}" >> $GITHUB_ENV + - name: Create release bundle + run: mv ${{ env.ZIP_NAME }} ${{ env.RELEASE_ZIP_NAME }}; zip -r ${{ env.RELEASE_ZIP_NAME }}.zip ${{ env.RELEASE_ZIP_NAME }} + - name: Check for release + id: create_release + run: | + if ! gh release view ${{ github.ref_name }}; then + git show -s --format=%B ${{ github.ref_name }} | tail -n +4 | gh release create ${{ github.ref_name }} -t ${{ github.ref_name }} -F - + fi + - name: Populate release + run: | + gh release upload ${{ github.ref_name }} ${{ env.RELEASE_ZIP_NAME }}.zip --clobber + - name: Set release live + run: | + gh release edit ${{ github.ref_name }} --draft=false diff --git a/DESCRIPTION.en_us.html b/DESCRIPTION.en_us.html deleted file mode 100644 index 34a7b19..0000000 --- a/DESCRIPTION.en_us.html +++ /dev/null @@ -1,12 +0,0 @@ -

- Please add a text describing the font here, 100 chracters or more, but no more than 500 words. - See https://googlefonts.github.io/gf-guide/description.html for further reference. - Please make sure that HTML characters are properly encoded. ('&' becomes & etc.) - If unsure, use https://www.freeformatter.com/html-escape.html for formatting. (Use "Escape HTML"). -

-

- Could be several paragraphs, also. -

-

- To contribute, see github.com/youruseraccount/yourrepository. -

\ No newline at end of file diff --git a/Makefile b/Makefile index d8a3bb6..7b41efc 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ -SOURCES=sources/TasSh.glyphs -FAMILY=TAS School Hand +SOURCES=sources/AuQldHand.glyphs +FAMILY=Edu QLD Hand DRAWBOT_SCRIPTS=$(shell ls documentation/*.py) DRAWBOT_OUTPUT=$(shell ls documentation/*.py | sed 's/\.py/.png/g') diff --git a/OFL.txt b/OFL.txt index 359c910..6cd1c95 100644 --- a/OFL.txt +++ b/OFL.txt @@ -1,4 +1,4 @@ -Copyright 2023 The Tasschoolhand Project Authors (https://github.com/googlefonts/googlefonts-project-template) +Copyright 2023 The TAS School Hand Australia Project Authors (https://github.com/SorkinType/TASSchoolhandAustralia) This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is copied below, and is also available with a FAQ at: diff --git a/requirements.txt b/requirements.txt index 89e58c4..76749a0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ fontmake>=2.4 fontbakery>=0.8.11 -gftools @ git+https://github.com/googlefonts/gftools@builder2 +gftools @ git+https://github.com/googlefonts/gftools@main fontprimer @ git+https://github.com/simoncozens/fontprimer gftools[qa]>=0.9.23 drawbot-skia>=0.4.8 diff --git a/sources/TasSh.glyphs b/sources/TasSh.glyphs index fdfcf13..94a652a 100644 --- a/sources/TasSh.glyphs +++ b/sources/TasSh.glyphs @@ -235,7 +235,7 @@ value = m01; } ); date = "2023-09-30 03:30:45 +0000"; -familyName = TasSh; +familyName = "Edu TAS Hand"; featurePrefixes = ( { automatic = 1; @@ -133447,20 +133447,20 @@ value = "Tina and Corey Anderson, Eben Sorkin, Mirko Velimirovic"; }, { key = designerURL; -value = "https://github.com/SorkinType/TASSchoolHandAustralia/"; +value = "https://github.com/MezMerrit/AU-School-Handwriting-Fonts"; }, { key = licenses; values = ( { language = dflt; -value = "This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is available with a FAQ at: https://scripts.sil.org/OFL"; +value = "This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is available with a FAQ at: https://openfontlicense.org"; } ); }, { key = licenseURL; -value = "https://scripts.sil.org/OFL"; +value = "https://openfontlicense.org/"; }, { key = manufacturers; diff --git a/sources/config.yaml b/sources/config.yaml index 7880c93..87779ef 100644 --- a/sources/config.yaml +++ b/sources/config.yaml @@ -1,7 +1,8 @@ recipeProvider: fontprimer sources: -- TasSh.glyphs -shortFamilyName: TAS + - TasSh.glyphs +familyName: Edu TAS Hand +shortFamilyName: Edu TAS variants: - name: Precursive alias: Pre