-
-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (68 loc) · 2.34 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Build Millennium Code
on:
workflow_dispatch: # Manual trigger
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Install jq
run: |
sudo apt-get update
sudo apt-get install -y jq
- name: Fetch Latest Iosevka Release
id: fetch-release
run: |
latest_release=$(curl -s https://api.github.com/repos/be5invis/Iosevka/releases/latest | jq -r .tag_name)
echo "release=${latest_release}" >> $GITHUB_ENV
- name: Clone Iosevka Source
run: |
git clone --depth=1 --branch ${release} https://github.com/be5invis/Iosevka.git $HOME/Iosevka
- name: Cache Docker Layers
uses: actions/cache@v3
with:
path: /tmp/docker-cache
key: ${{ runner.os }}-docker-${{ github.sha }}
restore-keys: |
${{ runner.os }}-docker-
- name: Build Docker Image
run: |
mkdir -p /tmp/docker-cache
docker build --cache-from /tmp/docker-cache -t fontcc $HOME/Iosevka/docker
- name: Cache Bun Dependencies
uses: actions/cache@v3
with:
path: ~/.bun
key: ${{ runner.os }}-bun-${{ hashFiles('private-build-plans.toml') }}
restore-keys: |
${{ runner.os }}-bun-
- name: Build Fonts
run: |
mkdir -p output
docker run --rm \
-v ${{ github.workspace }}:/work \
fontcc ttf::MillenniumCode
env:
VERSION_TAG: ${release}
- name: Adjust Permissions
run: |
sudo chmod -R 777 dist
- name: Archive Fonts
run: |
zip -r dist/Millennium_Code-Fonts-${{ github.run_id }}.zip dist/MillenniumCode/*
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
with:
tag_name: "v${{ github.run_id }}" # Unique tag for the release
name: "Millennium Code Release ${{ github.run_id }}"
body: |
Millennium Code fonts built from the latest Iosevka release (${{ env.release }}).
draft: false
prerelease: false
files: dist/Millennium_Code-Fonts-${{ github.run_id }}.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}