A collection of reusable GitHub Actions workflows. Based on Mise. Inspired by sxzz/workflows.
Setup mise environment for your workflow.
Cache support is powered by actions/cache.
There are some cache presets supported via the cache-preset input:
nub— Caches nub virtual store (~/.local/share/nub/store/v1), keyed bynub.lockeslint— Caches ESLint's lint cache (--cache, default.eslintcache), keyed by OS andnub.lock. Your lint task must pass--cacheand use the default cache location.mise-task— Caches mise task artifacts & state (~/.cache/mise/task-artifacts,~/.local/state/mise/task-artifacts,~/.local/state/mise/task-sources), keyed by OS. Requirescache = { enabled = true }in yourmise.tomltasks.
You can pass a single preset or comma-separated multiple:
- uses: lumirelle/workflows/setup-mise@main
with:
cache-preset: 'nub,mise-task'Each preset runs as an independent cache step with its own key and path. If a preset's default path or key does not fit your setup, disable that preset and define the cache with the custom options below.
For a custom cache, set cache-path (and optionally cache-key / cache-restore-keys). This adds an extra cache step alongside any presets:
- uses: lumirelle/workflows/setup-mise@v11
with:
# nub & mise-task still works
cache-preset: 'nub,mise-task'
# Your custom cache rules
cache-path: ./.cache
cache-key: 'my-cache-${{ runner.os }}'Every runnable step is optional: pass an empty string for its input to skip it. When a step is the only step of a job, the whole job is skipped (including its setup).
jobs:
ci:
uses: lumirelle/workflows/.github/workflows/ci.yml@v11
with:
check: '' # skip `mise run check`
test: '' # skip `mise run test`For the workflow who has more than one jobs inside, there are job specific cache presets.
For example, the CI workflow has two jobs: check & test. To cache ESLint for the check job only:
jobs:
ci:
uses: lumirelle/workflows/.github/workflows/ci.yml@v11
with:
cache-preset: nub
check-cache-preset: 'nub,eslint'Note
For the workflow who has only one job, cache-preset is enough.
- ci.yml: A workflow for continuous integration, runs
mise run check&mise run testby default - ci-autofix.yml: A workflow for continuous integration with autofix, runs
mise run fixby default - ci-coverage.yml: A workflow for continuous integration with code coverage, runs
mise run test --coverageby default
- release.yml: A workflow for releasing a new version, runs
mise run changelog&&mise run publishby default - release-commit.yml: A workflow for generating a release commit, runs
mise run publish-commit