|
| 1 | +# This is a basic workflow to help you get started with Actions |
| 2 | + |
| 3 | +name: CI |
| 4 | + |
| 5 | +# Controls when the action will run. |
| 6 | +on: |
| 7 | + # Triggers the workflow on push or pull request events but only for the master branch |
| 8 | + push: |
| 9 | + branches: [ master ] |
| 10 | + |
| 11 | + # Allows you to run this workflow manually from the Actions tab |
| 12 | + workflow_dispatch: |
| 13 | + |
| 14 | +# A workflow run is made up of one or more jobs that can run sequentially or in parallel |
| 15 | +jobs: |
| 16 | + |
| 17 | + # Workflow to build and install dependencies |
| 18 | + build: |
| 19 | + # The type of runner that the job will run on |
| 20 | + runs-on: ubuntu-latest |
| 21 | + |
| 22 | + env: |
| 23 | + RELEASE_TAG_VERSION: 2.2.0-RC |
| 24 | + GITHUB_ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} |
| 25 | + SANITY_TEST: ${{ secrets.SANITY_TEST }} |
| 26 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 27 | + |
| 28 | + steps: |
| 29 | + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it |
| 30 | + - uses: actions/checkout@v2 |
| 31 | + with: |
| 32 | + ref: master |
| 33 | + fetch-depth: '1' |
| 34 | + |
| 35 | + # Install and setup Dependencies |
| 36 | + - name: Setup core dependencies |
| 37 | + run: | |
| 38 | + sudo apt update -y -q |
| 39 | + sudo apt install software-properties-common -y -q |
| 40 | + sudo apt update -y -q |
| 41 | + sudo apt install fontforge -y -q |
| 42 | + sudo apt install python3-fontforge -y -q |
| 43 | +
|
| 44 | + - name: Setup additional dependencies |
| 45 | + run: | |
| 46 | + pip install fonttools --quiet |
| 47 | +
|
| 48 | + - name: Build FreeType from source |
| 49 | + run: | |
| 50 | + wget http://downloads.sourceforge.net/project/freetype/freetype2/2.7/freetype-2.7.tar.gz --quiet |
| 51 | + tar -zxf freetype-2.7.tar.gz |
| 52 | + cd freetype-2.7 |
| 53 | + ./configure |
| 54 | + make --quiet |
| 55 | + sudo make install --quiet |
| 56 | +
|
| 57 | + - name: Build Harfbuzz from source |
| 58 | + run: | |
| 59 | + wget http://www.freedesktop.org/software/harfbuzz/release/harfbuzz-1.3.4.tar.bz2 --quiet |
| 60 | + tar -xjf harfbuzz-1.3.4.tar.bz2 |
| 61 | + cd harfbuzz-1.3.4 |
| 62 | + ./configure |
| 63 | + make --quiet |
| 64 | + sudo make install --quiet |
| 65 | +
|
| 66 | + - name: Verify setup |
| 67 | + run: | |
| 68 | + fontforge --version |
| 69 | + fontforge --version 2>&1 | grep libfontforge | awk '{print $NF}' |
| 70 | +
|
| 71 | + - name: Patcher test run |
| 72 | + run: | |
| 73 | + fontforge --script ./font-patcher src/unpatched-fonts/Hasklig/Regular/Hasklig-Regular.otf --complete --quiet --no-progressbars |
| 74 | +
|
| 75 | + - name: Bump version and standardize the readme files |
| 76 | + run: | |
| 77 | + cd -- "$GITHUB_WORKSPACE/bin/scripts" |
| 78 | + ./version-bump.sh "$RELEASE_VERSION" |
| 79 | + ./standardize-and-complete-readmes.sh |
| 80 | +
|
| 81 | + - name: Patch all the fonts (just ShareTechMono for now) |
| 82 | + # let's test just on font family for now to prove it out |
| 83 | + # once proven we'll remove the font name and the hardcoded release and use the "release" script |
| 84 | + run: | |
| 85 | + cd -- "$GITHUB_WORKSPACE/bin/scripts" |
| 86 | + ./gotta-patch-em-all-font-patcher\!.sh "ShareTechMono" |
| 87 | +
|
| 88 | + - name: Generate fontconfig and casks |
| 89 | + run: | |
| 90 | + cd -- "$GITHUB_WORKSPACE/bin/scripts" |
| 91 | + ./generate-fontconfig.sh |
| 92 | + ./generate-casks.sh |
| 93 | +
|
| 94 | + - name: Archive font package zip files and upload for release (just ShareTechMono for now) |
| 95 | + run: | |
| 96 | + cd -- "$GITHUB_WORKSPACE/bin/scripts" |
| 97 | + ./archive-fonts.sh "ShareTechMono" |
| 98 | + GITHUB_TOKEN=$GITHUB_TOKEN ./upload-archives-lab.sh $RELEASE_TAG_VERSION |
0 commit comments