Skip to content

Commit 7321968

Browse files
committed
ci(build-font): improve font packaging and release process
- update build command to include all font formats (contents::IoskeleyMono) - adjust verification step to check for TTF and WOFF2 directories - refactor packaging to create separate archives for desktop (hinted/unhinted TTF) and web (WOFF2) - update release notes to reflect the new packaging structure and include web fonts - add WOFF2 files to the release assets
1 parent 820b336 commit 7321968

File tree

1 file changed

+29
-20
lines changed

1 file changed

+29
-20
lines changed

.github/workflows/build-font.yml

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -43,38 +43,43 @@ jobs:
4343
- name: Copy custom build plan
4444
run: cp private-build-plans.toml iosevka-src/
4545

46-
# 6. Navigate into the Iosevka directory, install dependencies, and build the font
47-
- name: Install dependencies and build font
46+
# 6. Install dependencies and build ALL font formats
47+
- name: Install dependencies and build all font formats
4848
run: |
4949
cd iosevka-src
5050
npm install
51-
npm run build -- ttf::IoskeleyMono
51+
npm run build -- contents::IoskeleyMono
5252
53-
# 7. Verify build output exists (More specific check)
53+
# 7. Verify build output exists for all formats
5454
- name: Verify build output
5555
run: |
56-
if [ ! -d "iosevka-src/dist/IoskeleyMono/TTF" ] || [ ! -d "iosevka-src/dist/IoskeleyMono/TTF-Unhinted" ]; then
57-
echo "Build output directories (TTF and/or TTF-Unhinted) not found!"
56+
if [ ! -d "iosevka-src/dist/IoskeleyMono/TTF" ] || [ ! -d "iosevka-src/dist/IoskeleyMono/WOFF2" ]; then
57+
echo "Build output directories (TTF and/or WOFF2) not found!"
5858
exit 1
5959
fi
60-
echo "Hinted and Unhinted build directories verified."
60+
echo "TTF and WOFF2 build directories verified."
6161
62-
# 8. Create separate ZIP archives for hinted and unhinted fonts (MODIFIED STEP)
62+
# 8. Create separate ZIP archives for Desktop and Web users
6363
- name: Package font files into separate archives
6464
run: |
65-
# Package the Hinted fonts
66-
cd iosevka-src/dist/IoskeleyMono/TTF
67-
zip -r ../../../../IoskeleyMono-Hinted.zip .
68-
# Package the Unhinted fonts
69-
cd ../TTF-Unhinted
70-
zip -r ../../../../IoskeleyMono-Unhinted.zip .
65+
# Navigate to the output directory to make zipping easier
66+
cd iosevka-src/dist/IoskeleyMono
67+
68+
# Package the Hinted TTF fonts for desktop
69+
zip -r ../../IoskeleyMono-TTF-Hinted.zip TTF
70+
71+
# Package the Unhinted TTF fonts for desktop
72+
zip -r ../../IoskeleyMono-TTF-Unhinted.zip TTF-Unhinted
73+
74+
# Package all WOFF2 fonts for web use
75+
zip -r ../../IoskeleyMono-Web.zip WOFF2 WOFF2-Unhinted
7176
7277
# 9. Set the release version number
7378
- name: Set Release Version
7479
id: vars
7580
run: echo "tag=$(date +'%Y.%m.%d')-${{ github.run_number }}" >> $GITHUB_OUTPUT
7681

77-
# 10. Create a new GitHub Release and upload both ZIP files (MODIFIED STEP)
82+
# 10. Create a new GitHub Release and upload all three ZIP files
7883
- name: Create Release and Upload Assets
7984
uses: softprops/action-gh-release@v1
8085
with:
@@ -83,11 +88,15 @@ jobs:
8388
body: |
8489
Automated build triggered by commit ${{ github.sha }}.
8590
86-
Two versions are attached:
87-
- `IoskeleyMono-Hinted.zip`: Fonts with hinting for better rendering on lower-resolution screens.
88-
- `IoskeleyMono-Unhinted.zip`: Raw, unhinted fonts preferred by some users, especially on high-DPI displays.
91+
**For Desktop Users:**
92+
- `IoskeleyMono-TTF-Hinted.zip`: Fonts with hinting. Best for most users on standard-resolution screens.
93+
- `IoskeleyMono-TTF-Unhinted.zip`: Raw fonts without hinting. Preferred by some on high-DPI screens.
94+
95+
**For Web Developers:**
96+
- `IoskeleyMono-Web.zip`: Contains all WOFF2 font files for web use.
8997
files: |
90-
IoskeleyMono-Hinted.zip
91-
IoskeleyMono-Unhinted.zip
98+
IoskeleyMono-TTF-Hinted.zip
99+
IoskeleyMono-TTF-Unhinted.zip
100+
IoskeleyMono-Web.zip
92101
env:
93102
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)