Skip to content

Commit

Permalink
Add font patcher to release in separate job
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanoasis committed Jan 3, 2022
1 parent e630dd1 commit 3bb002c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 21 deletions.
23 changes: 18 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,6 @@ jobs:
./generate-fontconfig.sh
./generate-casks.sh "${{ matrix.font }}"
- name: Archive font-patcher script for release
run: |
cd -- "$GITHUB_WORKSPACE/bin/scripts"
./archive-font-patcher.sh
- name: Archive font package zip files and upload for release
run: |
cd -- "$GITHUB_WORKSPACE/bin/scripts"
Expand All @@ -159,6 +154,24 @@ jobs:
patched-fonts/${{ matrix.font }}
LICENSE
release-font-patcher:
name: Archive font patcher and add to release
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Archive font-patcher script for release
run: |
cd -- "$GITHUB_WORKSPACE/bin/scripts"
./archive-font-patcher.sh
- name: Archive font package zip files and upload for release
run: |
cd -- "$GITHUB_WORKSPACE/bin/scripts"
GITHUB_TOKEN=$GITHUB_TOKEN PRERELEASE=$RELEASE_CANDIDATE ./upload-archives.sh $RELEASE_TAG_VERSION "FontPatcher"
commit:
name: Commit and push patched fonts to the repo
needs: build
Expand Down
25 changes: 9 additions & 16 deletions bin/scripts/get-font-names-from-json.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,15 @@
#!/bin/bash
#!/usr/bin/env bash
# Nerd Fonts Version: 2.1.0
# Script Version: 1.1.0
# Gets all the font folder names to build the matrix for the github actions

# used for debugging
# set -x

main() {
# json=()
# for i in $(jq '.fonts | keys | .[]' lib/fonts.json); do
# fontName=$(jq -r ".fonts[$i].patchedName" lib/fonts.json);
# json+=("$fontName");
# done
# # echo "${json[@]}"
# # printf '%s\n' "${json[@]}" | jq tojson | jq -R . | jq -s .
# # printf '%s\n' "${json[@]}" | jq -R . | jq -s .
# # stringified json:
# # printf '%s\n' "${json[@]}" | jq -R . | jq -s . | jq tojson
# echo "${json[@]}"
# @TODO uncomment and use FULL set once kinks worked out for Release Candidate Workflow
# jq '.fonts | .[] | .folderName' lib/fonts.json | jq -sc
# for testing:
# for testing a small subset (useful to prove out significant changes w/o all font overhead):
jq '.fonts | .[] | .folderName' lib/fonts-small-subset.json | jq -sc
# do all the fonts:
# add all the fonts to the matrix:
# jq '.fonts | .[] | .folderName' lib/fonts.json | jq -sc
}

Expand Down

0 comments on commit 3bb002c

Please sign in to comment.