Skip to content

Merge pull request #245 from x52dev/agent/use-shared-release-tools #39

Merge pull request #245 from x52dev/agent/use-shared-release-tools

Merge pull request #245 from x52dev/agent/use-shared-release-tools #39

Workflow file for this run

name: Release
on:
push:
branches: [main]
permissions:
contents: write
pull-requests: write
id-token: write
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@166cdcfd11aee3cb47222f9ddb555ce30ddb9659 # v1.17.0
- name: Authenticate with crates.io
uses: rust-lang/crates-io-auth-action@c6f97d42243bad5fab37ca0427f495c86d5b1a18 # v1.0.5
id: auth
- name: release-plz
uses: MarcoIeni/release-plz-action@e8792575c7f2366cf6ff3ccc33ead9ace5b691c7 # v0.5.130
id: release-plz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
- name: Install Determinate Nix
if: ${{ steps.release-plz.outputs.prs_created == 'true' || steps.release-plz.outputs.releases_created == 'true' }}
uses: DeterminateSystems/determinate-nix-action@2a0be2498974c2b6327e19780488744384637d88 # v3.21.7
with:
extra-conf: lazy-trees = true
- name: Set up FlakeHub Cache
if: ${{ steps.release-plz.outputs.prs_created == 'true' || steps.release-plz.outputs.releases_created == 'true' }}
uses: DeterminateSystems/flakehub-cache-action@3be0931021788e3bb4df65f59a555039c2fa2d46 # v3.21.7
- name: Enter Nix devshell
if: ${{ steps.release-plz.outputs.prs_created == 'true' || steps.release-plz.outputs.releases_created == 'true' }}
uses: nicknovitski/nix-develop@9be7cfb4b10451d3390a75dc18ad0465bed4932a # v1.2.1
- name: Bump changelog versions
if: ${{ steps.release-plz.outputs.prs_created == 'true' }}
env:
GH_TOKEN: ${{ github.token }}
RELEASE_PLZ_PR_JSON: ${{ steps.release-plz.outputs.pr }}
run: x52-bump-changelogs
- name: Update release notes
if: ${{ steps.release-plz.outputs.releases_created == 'true' }}
env:
GH_TOKEN: ${{ github.token }}
RELEASE_PLZ_RELEASES_JSON: ${{ steps.release-plz.outputs.releases }}
run: x52-update-release-notes