-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
15 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
name: Merge | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
paths: [".version"] | ||
tags: ** | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
@@ -24,81 +23,58 @@ jobs: | |
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
node-version: 22 | ||
|
||
- name: Install ttfautohint | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install ttfautohint | ||
- name: Clone Iosevka | ||
working-directory: .. | ||
run: | | ||
cd .. | ||
iosevka_version=$(cat ./zenbones-mono/.iosevka-version) | ||
git clone --depth 1 https://github.com/be5invis/Iosevka.git | ||
cd Iosevka | ||
git fetch --tags --quiet | ||
git checkout tags/${iosevka_version} | ||
- name: Build Zenbones Mono | ||
working-directory: ../Iosevka | ||
run: | | ||
cd ../Iosevka | ||
cp ../zenbones-mono/private-build-plans.toml ./private-build-plans.toml | ||
npm install | ||
npm run build -- contents::${{ matrix.typeface }} | ||
- name: Zip build files | ||
working-directory: ../Iosevka/dist | ||
run: | | ||
cd ../Iosevka/dist | ||
tar czf ${{ matrix.typeface }}.tar.gz ${{ matrix.typeface }} | ||
- name: Upload zip file | ||
uses: actions/upload-artifact@v4 | ||
working-directory: ../Iosevka/dist | ||
with: | ||
name: ${{ matrix.typeface }} | ||
path: /home/runner/work/zenbones-mono/Iosevka/dist/${{ matrix.typeface }}.tar.gz | ||
path: ${{ matrix.typeface }}.tar.gz | ||
|
||
release: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Download all workflow run artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
path: /home/runner/work/zenbones-mono/artifacts | ||
path: artifacts | ||
merge-multiple: true | ||
|
||
- name: Check Zenbones Mono version change | ||
uses: tj-actions/changed-files@v44 | ||
id: check-zenbones-version | ||
with: | ||
files: | | ||
.version | ||
- name: Create tag | ||
id: create_tag | ||
if: steps.check-zenbones-version.outputs.any_modified == 'true' | ||
run: | | ||
version=$(cat .version) | ||
echo "tag=${version}" >> $GITHUB_OUTPUT | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Michael Chris Lopez" | ||
git tag -a ${version} -m "Zenbones Mono ${version}" | ||
git push origin ${version} | ||
- name: Create release | ||
if: steps.check-zenbones-version.outputs.any_modified == 'true' | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
tag_name: ${{ steps.create_tag.outputs.tag }} | ||
name: ${{ steps.create_tag.outputs.tag }} | ||
files: | | ||
/home/runner/work/zenbones-mono/artifacts/*.tar.gz | ||
tag_name: ${{ github.ref_name }} | ||
name: ${{ github.ref_name }} | ||
files: artifacts/*.tar.gz | ||
|
||
# call-create-images-workflow: | ||
# uses: ./.github/workflows/create-images.yml | ||
# needs: build | ||
call-create-images-workflow: | ||
uses: ./.github/workflows/create-images.yml | ||
needs: build |