Skip to content

Commit

Permalink
Store fontbakery output as artifacts; some formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
justvanrossum committed Nov 28, 2023
1 parent a14b837 commit 5decb46
Showing 1 changed file with 30 additions and 4 deletions.
34 changes: 30 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,51 +12,77 @@ on:
jobs:
build:
runs-on: ubuntu-latest

steps:

- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.10"

- name: gen zip file name
id: zip-name
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
run: |
echo "ZIP_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')-fonts" >> $GITHUB_ENV
echo "FB_REPORTS_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')-fontbakery-reports" >> $GITHUB_ENV
- name: Install dependencies
run: |
pip install -r requirements.txt
- name: Build font
run: ./build.sh

- name: Archive font artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ env.ZIP_NAME }}
path: |
build/fonts
- name: Check with fontbakery
run: ./run_fontbakery.sh
continue-on-error: true
- name: Archive artifacts

- name: Archive fontbakery artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ env.ZIP_NAME }}
name: ${{ env.FB_REPORTS_NAME }}
path: |
build/fonts
build/fontbakery
outputs:
zip_name: ${{ env.ZIP_NAME }}

release:
# only run if the commit is tagged...
if: github.event_name == 'release'
# ... and it builds successfully
needs:
- build

runs-on: ubuntu-latest

env:
ZIP_NAME: ${{ needs.build.outputs.zip_name }}

steps:

- uses: actions/checkout@v2

- name: Download artefact files
uses: actions/download-artifact@v2
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:
Expand Down

0 comments on commit 5decb46

Please sign in to comment.