Skip to content

Commit

Permalink
Add latest tag for inputs.version (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
mintyfrankie authored Jun 29, 2023
1 parent 9bbeb96 commit bf23b5b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The token used to authenticate when fetching Typst distributions. When running t

### `version`

Exact version of Typst to use.
Exact version of Typst to use. Input `latest` if you want to use latest version of Typst.

> **Warning**
> Setup Typst `v2.0` does not support Typst `v0.1.0` or `v0.2.0`. If you want to use an old version, use [`v1`](https://github.com/yusancky/setup-typst/tree/v1).
Expand Down
9 changes: 9 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,22 @@ runs:
fi
shell: bash

- name: Download release if latest
uses: robinraju/[email protected]
with:
repository: typst/typst
latest: true
fileName: ${{ format('typst-x86_64-{0}.{1}', env.typst_asset_name, env.typst_asset_zip_name) }}
token: ${{ inputs.token }}
if: inputs.version == 'latest'
- name: Download release
uses: robinraju/[email protected]
with:
repository: typst/typst
tag: ${{ inputs.version }}
fileName: ${{ format('typst-x86_64-{0}.{1}', env.typst_asset_name, env.typst_asset_zip_name) }}
token: ${{ inputs.token }}
if: inputs.version != 'latest'

- name: Unzip Typst (Linux, macOS)
run: |
Expand Down

0 comments on commit bf23b5b

Please sign in to comment.