|
6 | 6 | build: |
7 | 7 | runs-on: ubuntu-latest |
8 | 8 | steps: |
9 | | - - uses: actions/checkout@v4 |
10 | | - - name: Set up Python 3.12 |
11 | | - uses: actions/setup-python@v5 |
12 | | - with: |
13 | | - python-version: "3.12" |
14 | | - - name: Install sys tools/deps |
15 | | - run: | |
16 | | - sudo apt-get update |
17 | | - sudo apt-get install ttfautohint |
18 | | - sudo snap install yq |
19 | | - - uses: actions/cache@v4 |
20 | | - with: |
21 | | - path: ./venv/ |
22 | | - key: ${{ runner.os }}-venv-${{ hashFiles('**/requirements*.txt') }} |
23 | | - restore-keys: | |
24 | | - ${{ runner.os }}-venv- |
25 | | - # - name: Do first-run script if necessary |
26 | | - # run: make .init.stamp |
27 | | - # if: github.repository != 'googlefonts/googlefonts-project-template' |
28 | | - # - uses: stefanzweifel/git-auto-commit-action@v4 |
29 | | - # name: First-run setup |
30 | | - # if: github.repository != 'googlefonts/googlefonts-project-template' |
31 | | - # with: |
32 | | - # file_pattern: .init.stamp README.md requirements.txt OFL.txt |
33 | | - # commit_message: "Personalize for this repo" |
34 | | - - name: gen zip file name |
35 | | - id: zip-name |
36 | | - shell: bash |
37 | | - # Set the archive name to repo name + "-assets" e.g "MavenPro-assets" |
38 | | - run: echo "ZIP_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')-fonts" >> $GITHUB_ENV |
39 | | - # If a new release is cut, use the release tag to auto-bump the source files |
40 | | - - name: Bump release |
41 | | - if: github.event_name == 'release' |
42 | | - run: | |
43 | | - . venv/bin/activate |
44 | | - SRCS=$(yq e ".sources[]" sources/config.yaml) |
45 | | - TAG_NAME=${GITHUB_REF/refs\/tags\//} |
46 | | - echo "Bumping $SRCS to $TAG_NAME" |
47 | | - for src in $SRCS |
48 | | - do |
49 | | - bumpfontversion sources/$src --new-version $TAG_NAME; |
50 | | - done |
51 | | - - name: Build font |
52 | | - run: make build |
53 | | - - name: Check with fontbakery |
54 | | - run: make test |
55 | | - continue-on-error: true |
56 | | - - name: proof |
57 | | - run: make proof |
58 | | - - name: setup site |
59 | | - run: mkdir out && cp scripts/index.html out/index.html && cp Sixtyfour/scripts/index.html out/index-sixtyfour.html && cp Workbench/scripts/index.html out/index-workbench.html |
60 | | - - name: Deploy |
61 | | - uses: peaceiris/actions-gh-pages@v4 |
62 | | - if: ${{ github.ref == 'refs/heads/main' }} |
63 | | - with: |
64 | | - github_token: ${{ secrets.GITHUB_TOKEN }} |
65 | | - publish_dir: ./out |
66 | | - - name: Archive artifacts |
67 | | - uses: actions/upload-artifact@v4 |
68 | | - with: |
69 | | - name: ${{ env.ZIP_NAME }} |
70 | | - path: | |
71 | | - fonts |
72 | | - out |
| 9 | + - uses: actions/checkout@v4 |
| 10 | + - name: Set up Python 3.12 |
| 11 | + uses: actions/setup-python@v5 |
| 12 | + with: |
| 13 | + python-version: "3.12" |
| 14 | + - name: Install sys tools/deps |
| 15 | + run: | |
| 16 | + sudo apt-get update |
| 17 | + sudo apt-get install ttfautohint |
| 18 | + sudo snap install yq |
| 19 | + - uses: actions/cache@v4 |
| 20 | + with: |
| 21 | + path: ./venv/ |
| 22 | + key: ${{ runner.os }}-venv-${{ hashFiles('**/requirements*.txt') }} |
| 23 | + restore-keys: | |
| 24 | + ${{ runner.os }}-venv- |
| 25 | + # - name: Do first-run script if necessary |
| 26 | + # run: make .init.stamp |
| 27 | + # if: github.repository != 'googlefonts/googlefonts-project-template' |
| 28 | + # - uses: stefanzweifel/git-auto-commit-action@v4 |
| 29 | + # name: First-run setup |
| 30 | + # if: github.repository != 'googlefonts/googlefonts-project-template' |
| 31 | + # with: |
| 32 | + # file_pattern: .init.stamp README.md requirements.txt OFL.txt |
| 33 | + # commit_message: "Personalize for this repo" |
| 34 | + - name: gen zip file name |
| 35 | + id: zip-name |
| 36 | + shell: bash |
| 37 | + # Set the archive name to repo name + "-assets" e.g "MavenPro-assets" |
| 38 | + run: echo "ZIP_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')-fonts" >> $GITHUB_ENV |
| 39 | + # If a new release is cut, use the release tag to auto-bump the source files |
| 40 | + - name: Bump release |
| 41 | + if: github.event_name == 'release' |
| 42 | + run: | |
| 43 | + . venv/bin/activate |
| 44 | + SRCS=$(yq e ".sources[]" sources/config.yaml) |
| 45 | + TAG_NAME=${GITHUB_REF/refs\/tags\//} |
| 46 | + echo "Bumping $SRCS to $TAG_NAME" |
| 47 | + for src in $SRCS |
| 48 | + do |
| 49 | + bumpfontversion sources/$src --new-version $TAG_NAME; |
| 50 | + done |
| 51 | + - name: Build font |
| 52 | + run: make build |
| 53 | + - name: Check with fontbakery |
| 54 | + run: make test |
| 55 | + continue-on-error: true |
| 56 | + - name: proof |
| 57 | + run: make proof |
| 58 | + - name: setup site |
| 59 | + run: mkdir out && cp scripts/index.html out/index.html && cp Sixtyfour/scripts/index.html out/index-sixtyfour.html && cp Workbench/scripts/index.html out/index-workbench.html |
| 60 | + - name: Deploy |
| 61 | + uses: peaceiris/actions-gh-pages@v4 |
| 62 | + if: ${{ github.ref == 'refs/heads/main' }} |
| 63 | + with: |
| 64 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 65 | + publish_dir: ./out |
| 66 | + - name: Archive artifacts |
| 67 | + uses: actions/upload-artifact@v4 |
| 68 | + with: |
| 69 | + name: ${{ env.ZIP_NAME }} |
| 70 | + path: | |
| 71 | + fonts |
| 72 | + out |
73 | 73 | outputs: |
74 | 74 | zip_name: ${{ env.ZIP_NAME }} |
75 | 75 | release: |
|
0 commit comments