Skip to content

Commit

Permalink
Release Test
Browse files Browse the repository at this point in the history
  • Loading branch information
Lypsilonx committed May 17, 2024
1 parent e2cdb9f commit c897ae9
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 12 deletions.
75 changes: 67 additions & 8 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,89 @@ permissions:

jobs:
build:
env:
TYPST_FONT_PATHS: ./fonts
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Typst
uses: lvignoli/typst-action@main
env:
TYPST_FONT_PATHS: ./fonts
- name: Render Rules
uses: leana8959/typst-action@main
with:
source_file: |
Game of Intrigue.typ
options: |
--input=render_type=single
- run: |
mkdir -p out
mv Game\ of\ Intrigue.pdf out/Game\ of\ Intrigue.pdf
- name: Render Single
uses: leana8959/typst-action@main
with:
source_file: |
cards.typ
cards_abstract.typ
Game of Intrigue.typ
options: |
--input=render_type=single
- run: |
mkdir -p out/cards/single
mv cards.pdf out/cards/single/cards.pdf
mv cards_abstract.pdf out/cards/single/cards_abstract.pdf
- name: Render Single Foldable
uses: leana8959/typst-action@main
with:
source_file: |
cards.typ
cards_abstract.typ
options: |
--input=render_type=single_foldable
- run: |
mkdir -p out/cards/single_foldable
mv cards.pdf out/cards/single_foldable/cards.pdf
mv cards_abstract.pdf out/cards/single_foldable/cards_abstract.pdf
- name: Render Foldable
uses: leana8959/typst-action@main
with:
source_file: |
cards.typ
cards_abstract.typ
options: |
--input=render_type=foldable
- run: |
mkdir -p out/cards/foldable
mv cards.pdf out/cards/foldable/cards.pdf
mv cards_abstract.pdf out/cards/foldable/cards_abstract.pdf
- name: Render Double Sided
uses: leana8959/typst-action@main
with:
source_file: |
cards.typ
cards_abstract.typ
options: |
--input=render_type=double_sided
- run: |
mkdir -p out/cards/double_sided
mv cards.pdf out/cards/double_sided/cards.pdf
mv cards_abstract.pdf out/cards/double_sided/cards_abstract.pdf
- name: Upload PDF file
- name: Upload Files
uses: actions/upload-artifact@v4
with:
name: Game of Intrigue
path: "*.pdf"
path: "out/**"

- name: Release
uses: softprops/action-gh-release@v2
if: github.ref_type == 'tag'
with:
name: "${{ github.ref_name }}"
files: "*.pdf"
files: "out/**"
2 changes: 1 addition & 1 deletion cards.typ
Original file line number Diff line number Diff line change
Expand Up @@ -303,4 +303,4 @@
}

// Render
#render_foldable(render_card, render_card_back)
#render(sys.inputs.render_type, render_card, render_card_back)
6 changes: 3 additions & 3 deletions cards_abstract.typ
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#let render_card(type, value: none, illegal: false, color: none, cut_guide: true, supertitle: none) = {
let has_supertitle = supertitle != none and display_supertitle
let is_role = supertitle == "Role"
set text(font: "Proxima Nova", weight: "medium")
set text(font: "Inter Tight", weight: "medium")
box(
width: card_width,
height: card_height,
Expand Down Expand Up @@ -223,7 +223,7 @@
}

#let render_card_back(value: none, illegal: false, cut_guide: true, role: false) = {
set text(font: "Proxima Nova", weight: "medium")
set text(font: "Inter Tight", weight: "medium")
box(
width: card_width,
height: card_height,
Expand Down Expand Up @@ -314,4 +314,4 @@
}

// Render
#render_foldable(render_card, render_card_back)
#render(sys.inputs.render_type, render_card, render_card_back)
12 changes: 12 additions & 0 deletions render.typ
Original file line number Diff line number Diff line change
Expand Up @@ -294,4 +294,16 @@
}
}
).flatten())
}

#let render(render_type, render_card, render_card_back) = {
if render_type == "single" {
render_single(render_card, render_card_back)
} else if render_type == "single_foldable" {
render_single_foldable(render_card, render_card_back)
} else if render_type == "foldable" {
render_foldable(render_card, render_card_back)
} else if render_type == "double_sided" {
render_double_sided(render_card, render_card_back)
}
}

0 comments on commit c897ae9

Please sign in to comment.