-
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (37 loc) · 1.1 KB
/
main.yaml
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
# github action main.yaml file
# on applying a v* tag, the workflow will be triggered and...
# - render cards.typ, Game of Intrigue.typ and cards_abstract.typ to .pdf (with typst)
# - put all the .pdf files in a new release
name: Build and Release
on: [push, workflow_dispatch]
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Typst
uses: lvignoli/typst-action@main
with:
source_file: |
cards.typ
cards_abstract.typ
Game of Intrigue.typ
options: |
fonts --font-path fonts
- name: Upload PDF file
uses: actions/upload-artifact@v4
with:
name: Game of Intrigue
path: "*.pdf"
- name: Get current date
id: date
run: echo "DATE=$(date +%Y-%m-%d-%H:%M)" >> $GITHUB_ENV
- name: Release
uses: softprops/action-gh-release@v2
if: github.ref_type == 'tag'
with:
name: "${{ github.ref_name }} — ${{ env.DATE }}"
files: main.pdf