name: release
on:
push:
branches: [main]
permissions:
contents: read
jobs:
release-pr:
name: release pull request
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
concurrency:
group: release-plz-${{ github.ref }}
cancel-in-progress: false
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 with:
fetch-depth: 0
token: ${{ secrets.RELEASE_PLZ_TOKEN }}
- name: Install the Rust toolchain
run: rustup show active-toolchain || rustup toolchain install
- name: Open the release pull request
uses: release-plz/action@d6c56271d640b6c1b61d1e00593641c400a9f4bd with:
command: release-pr
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }}
release:
name: publish
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 with:
fetch-depth: 0
- name: Install the Rust toolchain
run: rustup show active-toolchain || rustup toolchain install
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 with:
bun-version: latest
- name: Build the interface
run: cd web && bun install && bun run build
- name: Mint a registry token for this run
uses: rust-lang/crates-io-auth-action@c6f97d42243bad5fab37ca0427f495c86d5b1a18 id: auth
- name: Publish and tag
uses: release-plz/action@d6c56271d640b6c1b61d1e00593641c400a9f4bd with:
command: release
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}