GitHub Actions
Overview
Section titled “Overview”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.
Quick start
Section titled “Quick start”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 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 with: publish: falseInputs
Section titled “Inputs”| Name | Type | Default | Description |
|---|---|---|---|
config | string | rlsr.yml | Path to the rlsr config file. |
publish | string | false | Publish artifacts (false passes --skip-publish). |
rm_dist | string | false | Remove the dist directory before building. |
rlsr_version | string | latest | Version tag to install (example: v0.8.1). |
args | string | "" | Extra args for rlsr (space-separated). |
working_directory | string | . | Working directory to run rlsr in. |
github_token | string | "" | Token for GitHub API operations. Falls back to GITHUB_TOKEN. |
Notes and behavior
Section titled “Notes and behavior”- Publishing needs a tag and a clean repo; otherwise
rlsrskips publish. - Use
actions/checkoutwithfetch-depth: 0so tags are available for changelogs. - Supported runners: Linux x86_64 and macOS arm64.
- Use
rlsr_versionto pin a known version instead oflatest.
Advanced examples
Section titled “Advanced examples”Monorepo working directory:
jobs: release: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: fetch-depth: 0 with: working_directory: ./crates/my-tool config: rlsr.yml publish: trueCustom runner:
jobs: release: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 with: fetch-depth: 0 with: publish: falseLocal testing with act
Section titled “Local testing with act”Use your normal workflow file and run it with:
act workflow_dispatch -W .github/workflows/your-workflow.yml -s GITHUB_TOKEN=dummy