-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (46 loc) · 1.51 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
name: "Build Fonts"
on:
push:
branches:
- main
paths:
- flake.nix
- utils/stylix/plans/*.toml
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- name: "Install Nix"
uses: cachix/install-nix-action@v22
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Create Short Sha
run: echo "SHORT_SHA=`git rev-parse --short HEAD`" >> $GITHUB_ENV
- name: "Build Josevka"
run: |
nix build -L .#josevka --cores 2
zip -9 josevka-$SHORT_SHA.zip ./result/share/fonts/truetype/*.ttf
- name: "Build Josevka Code"
run: |
nix build -L .#josevka-code --cores 2
zip -9 josevka-code-$SHORT_SHA.zip ./result/share/fonts/truetype/*.ttf
- name: "Build Josevka Book"
run: |
nix build -L .#josevka-book-sans --cores 2
zip -9 josevka-book-sans-$SHORT_SHA.zip ./result/share/fonts/truetype/*.ttf
nix build -L .#josevka-book-slab --cores 2
zip -9 josevka-book-slab-$SHORT_SHA.zip ./result/share/fonts/truetype/*.ttf
- name: Expose git commit data
uses: rlespinasse/git-commit-data-action@v1
- name: Release Fonts
uses: ncipollo/release-action@v1
with:
artifacts: "*.zip"
body: ${{ env.GIT_COMMIT_MESSAGE_BODY }}
commit: ${{ github.event.head_commit.id }}
tag: ${{ env.SHORT_SHA }}
token: ${{ secrets.GITHUB_TOKEN }}
name: "Josevka-${{ env.SHORT_SHA }}"