https://github.com/typst-community/setup-hayagriva
🏷️ Installs the Hayagriva CLI for GitHub Actions
https://github.com/typst-community/setup-hayagriva
action bibliography citations github-action github-actions hayagriva setup-action typst typst-community
Last synced: 2 months ago
JSON representation
🏷️ Installs the Hayagriva CLI for GitHub Actions
- Host: GitHub
- URL: https://github.com/typst-community/setup-hayagriva
- Owner: typst-community
- License: mit
- Created: 2024-01-29T22:23:22.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-06T18:04:05.000Z (over 1 year ago)
- Last Synced: 2025-06-13T11:58:09.046Z (4 months ago)
- Topics: action, bibliography, citations, github-action, github-actions, hayagriva, setup-action, typst, typst-community
- Language: JavaScript
- Homepage:
- Size: 1.04 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Setup Hayagriva
🏷️ Installs [the Hayagriva CLI](https://github.com/typst/hayagriva#installation) for GitHub Actions
```yaml
- uses: jcbhmr/setup-hayagriva@v1
- run: hayagriva literature.yml reference --style apa
```✅ Installs the `hayagriva` CLI globally \
📌 Supports version pinning \
⚡ Caches the compiled binary using [@actions/cache](https://www.npmjs.com/package/@actions/cache) \
📥 Downloads from [the Hayagriva GitHub releases](https://github.com/typst/hayagriva/releases)## Usage

**🚀 Here's what you're after:**
```yml
on: push
jobs:
job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: jcbhmr/setup-hayagriva@v1
- run: hayagriva literature.yml reference
```### Inputs
- **`hayagriva-version`:** Which version of Hayagriva to install. This can be an exact version specifier such as `0.5.1` or a semver range like `~0.5.0` or `0.x`. Use `latest` to always install the latest release. Defaults to `latest`.
- **`hayagriva-token`:** The GitHub token to use when fetching the version list from [typst/hayagriva](https://github.com/typst/hayagriva/releases). You shouldn't have to touch this. The default is the `github.token` if you're on github.com or unauthenticated (rate limited) if you're not on github.com.
- **`cache`:** Whether or not to use the workflow cache to cache the compiled `hayagriva` binary for future runs.
### Outputs
- **`hayagriva-version`:** The version of Hayagriva that was installed. This will be something like `0.5.1` or similar.
- **`cache-hit`:** Whether or not Hayagriva was restored from the runner's cache or download anew.
## Development

This GitHub Action uses Bun to bundle the main entry point plus all the imported dependencies into a single `.js` file ready to be run by `main: dist/main.js` in the `action.yml`. To test the action just open a PR (even a draft one) and some magic GitHub Actions will test your changes. 🧙♂️
ℹ Once [Bun gets Windows support](https://github.com/oven-sh/bun/issues/43) make sure you add back the `runs-on: windows-latest` test to `test-action.yml`.