Skip to content

Commit 0dd1d50

Browse files
New exports, added folders
Creating clearer division between google fonts and other exports
1 parent 39d556e commit 0dd1d50

414 files changed

Lines changed: 6080 additions & 7 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
name: Create Release
2+
# Release workflow for Mona Sans
3+
4+
on:
5+
push:
6+
tags:
7+
- 'v*.*' # Matches tags like v1.300, etc.
8+
workflow_dispatch:
9+
inputs:
10+
version:
11+
description: 'Version for testing (e.g., "test-1.4" or "dev-2024-01-01")'
12+
required: true
13+
default: 'test-1.4'
14+
type: string
15+
16+
permissions:
17+
contents: write # Required to create releases and upload assets
18+
19+
jobs:
20+
build:
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- name: Checkout code
25+
uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 0 # Full history for proper release notes
28+
29+
- name: Set up Python 3.10
30+
uses: actions/setup-python@v5
31+
with:
32+
python-version: "3.10"
33+
34+
- name: Install system dependencies
35+
run: |
36+
sudo apt-get update
37+
sudo apt-get install ttfautohint libcairo2-dev python3-cairo-dev pkg-config python3-dev
38+
39+
- name: Install Python dependencies
40+
run: |
41+
python3 -m pip install --upgrade pip setuptools
42+
python3 -m pip install gftools fontbakery
43+
44+
- name: Extract version from tag or input
45+
id: version
46+
run: |
47+
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
48+
VERSION="${{ github.event.inputs.version }}"
49+
TAG="v${VERSION}"
50+
echo "version=${VERSION}" >> $GITHUB_OUTPUT
51+
echo "tag=${TAG}" >> $GITHUB_OUTPUT
52+
else
53+
VERSION=${GITHUB_REF#refs/tags/v}
54+
echo "version=${VERSION}" >> $GITHUB_OUTPUT
55+
echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
56+
fi
57+
58+
- name: Build fonts
59+
run: |
60+
cd sources
61+
bash build.sh
62+
cd ..
63+
env:
64+
FB_CONTINUE_ON_ERROR: true
65+
66+
- name: Prepare release artifacts
67+
run: |
68+
mkdir -p release-artifacts
69+
70+
# Create static fonts package (OTF + TTF)
71+
zip -r "release-artifacts/mona-sans-static-v${{ steps.version.outputs.version }}.zip" \
72+
fonts/static/ OFL.txt README.md
73+
74+
# Create variable fonts package
75+
zip -r "release-artifacts/mona-sans-variable-v${{ steps.version.outputs.version }}.zip" \
76+
fonts/variable/ OFL.txt README.md
77+
78+
# Create webfonts package
79+
if [ -d "fonts/webfonts" ]; then
80+
zip -r "release-artifacts/mona-sans-webfonts-v${{ steps.version.outputs.version }}.zip" \
81+
fonts/webfonts/ OFL.txt README.md
82+
fi
83+
84+
# Create complete package with all formats
85+
zip -r "release-artifacts/mona-sans-complete-v${{ steps.version.outputs.version }}.zip" \
86+
fonts/ -x "fonts/googlefonts/*" \
87+
OFL.txt README.md
88+
89+
- name: Create release notes
90+
id: release_notes
91+
run: |
92+
cat > release_notes.md << 'EOF'
93+
# Mona Sans ${{ steps.version.outputs.tag }}
94+
95+
A versatile typeface, designed by GitHub together with Degarism and inspired by industrial-era grotesques. Mona Sans works well across product, web, and print.
96+
97+
## Font Packages
98+
99+
- **Static Fonts** - Individual OTF and TTF files for each weight, width, and style
100+
- **Variable Fonts** - Modern variable font files with adjustable weight and width
101+
- **Web Fonts** - WOFF/WOFF2 files optimized for web use
102+
- **Complete Package** - All font formats in one download
103+
104+
See the [README](https://github.com/github/mona-sans#readme) for detailed installation instructions.
105+
106+
## Font Specifications
107+
108+
- **Weight Range**: 100-900 (Thin to Black)
109+
- **Width Range**: 75-125 (Condensed to Expanded)
110+
- **Styles**: Roman and Italic
111+
- **Format Support**: OTF, TTF, Variable TTF, WOFF, WOFF2
112+
EOF
113+
114+
- name: Create draft release with assets
115+
uses: softprops/action-gh-release@v2
116+
with:
117+
tag_name: ${{ steps.version.outputs.tag }}
118+
name: Mona Sans ${{ steps.version.outputs.tag }}
119+
body_path: release_notes.md
120+
draft: true
121+
prerelease: false
122+
files: |
123+
release-artifacts/mona-sans-static-v${{ steps.version.outputs.version }}.zip
124+
release-artifacts/mona-sans-variable-v${{ steps.version.outputs.version }}.zip
125+
release-artifacts/mona-sans-webfonts-v${{ steps.version.outputs.version }}.zip
126+
release-artifacts/mona-sans-complete-v${{ steps.version.outputs.version }}.zip
127+
128+
- name: Upload build artifacts
129+
uses: actions/upload-artifact@v4
130+
with:
131+
name: mona-sans-fonts-v${{ steps.version.outputs.version }}
132+
path: fonts/
133+
134+
- name: Summary
135+
run: |
136+
echo "## Release Summary" >> $GITHUB_STEP_SUMMARY
137+
echo "Created draft release: **Mona Sans ${{ steps.version.outputs.tag }}**" >> $GITHUB_STEP_SUMMARY
138+
echo "" >> $GITHUB_STEP_SUMMARY
139+
echo "### Uploaded Assets:" >> $GITHUB_STEP_SUMMARY
140+
ls -lh release-artifacts/*.zip | while read line; do
141+
filename=$(echo "$line" | awk '{print $9}' | xargs basename)
142+
size=$(echo "$line" | awk '{print $5}')
143+
echo "- $filename ($size)" >> $GITHUB_STEP_SUMMARY
144+
done
145+
echo "" >> $GITHUB_STEP_SUMMARY
146+
echo "πŸ”— **[View Draft Release](https://github.com/${{ github.repository }}/releases/tag/${{ steps.version.outputs.tag }})**" >> $GITHUB_STEP_SUMMARY
352 KB
Binary file not shown.
92.5 KB
Binary file not shown.

0 commit comments

Comments
Β (0)