Skip to content

GitHub Actions

Rlsr ships a composite GitHub Action so you can run releases as a single step alongside other steps (like installing Rust or running tests). It installs a pinned rlsr release, runs your rlsr.yml, and optionally publishes artifacts.

Release on tags:

name: Release
on:
push:
tags:
- "v*"
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Release
uses: iamd3vil/rlsr/.github/actions/[email protected]
with:
config: rlsr.yml
publish: true
rm_dist: true
github_token: ${{ secrets.GITHUB_TOKEN }}

Build only (no publish):

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: iamd3vil/rlsr/.github/actions/[email protected]
with:
publish: false
NameTypeDefaultDescription
configstringrlsr.ymlPath to the rlsr config file.
publishstringfalsePublish artifacts (false passes --skip-publish).
rm_diststringfalseRemove the dist directory before building.
rlsr_versionstringlatestVersion tag to install (example: v0.8.1).
argsstring""Extra args for rlsr (space-separated).
working_directorystring.Working directory to run rlsr in.
github_tokenstring""Token for GitHub API operations. Falls back to GITHUB_TOKEN.
  • Publishing needs a tag and a clean repo; otherwise rlsr skips publish.
  • Use actions/checkout with fetch-depth: 0 so tags are available for changelogs.
  • Supported runners: Linux x86_64 and macOS arm64.
  • Use rlsr_version to pin a known version instead of latest.

Monorepo working directory:

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: iamd3vil/rlsr/.github/actions/[email protected]
with:
working_directory: ./crates/my-tool
config: rlsr.yml
publish: true

Custom runner:

jobs:
release:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: iamd3vil/rlsr/.github/actions/[email protected]
with:
publish: false

Use your normal workflow file and run it with:

Terminal window
act workflow_dispatch -W .github/workflows/your-workflow.yml -s GITHUB_TOKEN=dummy