Setup UTPM GitHub Action

November 15, 2025 ยท View on GitHub

This action installs and configures UTPM (Unofficial Typst Package Manager).

Usage

name: CI
on: [push]

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

    - name: Setup UTPM
      uses: typst-community/setup-utpm@v1
      with:
        version: 'latest'  # or specific version like '0.2.0'

    - name: Use UTPM
      run: utpm --version

Inputs

NameDescriptionDefaultRequired
versionVersion of UTPM to install (e.g., "0.3.0" or "latest")'latest'No
tokenGitHub token for API requests (to avoid rate limiting)${{ github.token }}No

Outputs

NameDescription
versionThe installed version of UTPM
cache-hitWhether the installation was restored from cache

Development

This action is written in TypeScript. To build and package it:

# Install dependencies
npm install

# Build TypeScript to JavaScript
npm run build

# Package the action for distribution (includes dependencies)
npm run package

The compiled action is in dist/index.js and must be committed to the repository for the action to work.

More Details

For more details, please visit the GitHub repository and navigate to /docs/ACTION.md.

License

The scripts and documentation in this project are released under the MIT License.