-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
59 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,25 @@ | ||
# setup-typst | ||
Setup Typst in GitHub Actions | ||
# Setup Typst | ||
|
||
Setup Typst in GitHub Actions (currently only supported for Windows). | ||
|
||
## Inputs | ||
|
||
### `token` | ||
|
||
The token used to authenticate when fetching Typst distributions. When running this action on github.com, the default value is sufficient. When running on GHES, you can pass a personal access token for github.com if you are experiencing rate limiting. | ||
|
||
### `version` | ||
|
||
Exact version of Typst to use. | ||
|
||
## Example usage | ||
|
||
```yaml | ||
- uses: yusancky/[email protected] | ||
id: setup-typst | ||
with: | ||
version: 'v0.2.0' | ||
- run: typst compile file.typ | ||
``` | ||
You can also use the additional uses given in [Usage](https://github.com/typst/typst#usage) in the Typst documentation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Setup Typst | ||
author: yusancky | ||
description: Setup Typst in GitHub Actions | ||
inputs: | ||
token: | ||
description: The token used to authenticate when fetching Typst distributions. When running this action on github.com, the default value is sufficient. When running on GHES, you can pass a personal access token for github.com if you are experiencing rate limiting. | ||
default: ${{ github.server_url == 'https://github.com' && github.token || '' }} | ||
version: | ||
description: Exact version of Typst to use. | ||
outputs: | ||
path: | ||
description: The absolute path to the Typst executable. | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Download release | ||
uses: robinraju/[email protected] | ||
with: | ||
repository: "typst/typst" | ||
tag: ${{ inputs.version }} | ||
fileName: "typst-x86_64-pc-windows-msvc.zip" | ||
token: ${{ inputs.token }} | ||
- name: Unzip Typst | ||
run: 7z x typst-x86_64-pc-windows-msvc.zip -oc:\typst typst.exe -r | ||
shell: bash | ||
- name: Delete zip | ||
run: rm -f typst-x86_64-pc-windows-msvc.zip | ||
shell: bash | ||
- name: Output Typst path | ||
run: echo "c:\typst\typst-x86_64-pc-windows-msvc" >> $GITHUB_PATH | ||
shell: bash | ||
branding: | ||
color: blue | ||
icon: download |