name: Release-plz
permissions:
contents: write
pull-requests: write
on:
push:
branches:
- main
jobs:
toolchain:
name: Setup Rust toolchain
runs-on: ubuntu-latest
outputs:
toolchain: ${{steps.set_toolchain.outputs.toolchain}}
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Output toolchain
id: set_toolchain
env:
toolchain_toml: "rust-toolchain.toml"
run: |
toolchain=$(grep channel rust-toolchain.toml | sed -r 's/channel = "(.*)"/\1/')
echo "toolchain=$toolchain" | tee -a "$GITHUB_OUTPUT"
release-plz:
name: Run release-plz
runs-on: ubuntu-latest
needs: toolchain
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd with:
fetch-depth: 0
- name: Install Rust
uses: dtolnay/rust-toolchain@efa25f7f19611383d5b0ccf2d1c8914531636bf9
with:
toolchain: ${{needs.toolchain.outputs.toolchain}}
- name: Run release-plz
uses: MarcoIeni/release-plz-action@1528104d2ca23787631a1c1f022abb64b34c1e11 env:
GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}