-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (44 loc) · 1.22 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
name: Build
on:
workflow_dispatch:
push:
branches: ["main"]
tags: ["v*.*.*"]
pull_request:
branches: ["main"]
permissions:
contents: write
jobs:
build:
runs-on: macos-latest
steps:
- name: 📥 Checkout repository
uses: actions/checkout@v3
- name: 🧰 Download Typst
uses: robinraju/[email protected]
with:
repository: typst/typst
tag: v0.11.0
fileName: typst-x86_64-apple-darwin.tar.xz
- name: 🧰 Extract Typst
shell: bash
run: |
sudo mkdir /usr/local/typst
sudo tar -xzf typst-x86_64-apple-darwin.tar.xz -C /usr/local/typst/
rm -f typst-x86_64-apple-darwin.tar.xz
echo "/usr/local/typst/typst-x86_64-apple-darwin" >> $GITHUB_PATH
- name: 📘 Compile
shell: bash
run: ./build.sh
- name: 📦 Upload artifacts
uses: actions/upload-artifact@v3
with:
name: docs
path: src/*.pdf
- name: 🚀 Release
uses: softprops/action-gh-release@v1
if: github.ref_type == 'tag'
with:
name: ${{ github.ref_name }}
tag_name: ${{ github.ref_name }}
files: "src/*.pdf"