From 5582a0dfbfdb53cd892cbb220618fb61147c840f Mon Sep 17 00:00:00 2001 From: Vlad Frolov Date: Thu, 12 Feb 2026 22:55:08 +0100 Subject: [PATCH] ci: Make sure that the binaries release CD it kicking in after release-plz --- .github/workflows/release-plz.yml | 12 +++++++++++- .github/workflows/release.yml | 11 ++++++++--- Cargo.toml | 3 +-- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release-plz.yml b/.github/workflows/release-plz.yml index 519abe97..169b072f 100644 --- a/.github/workflows/release-plz.yml +++ b/.github/workflows/release-plz.yml @@ -24,12 +24,22 @@ jobs: - &install-rust name: Install Rust toolchain uses: dtolnay/rust-toolchain@stable + # Generating a GitHub token, so that PRs and tags created by + # the release-plz-action can trigger actions workflows. + - name: Generate GitHub token + uses: actions/create-github-app-token@v2 + id: generate-token + with: + # GitHub App ID secret name + app-id: ${{ secrets.GITHUB_RELEASES_MANAGER_APP_ID }} + # GitHub App private key secret name + private-key: ${{ secrets.GITHUB_RELEASES_MANAGER_APP_PRIVATE_KEY }} - name: Run release-plz uses: release-plz/action@v0.5 with: command: release env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} # Create a PR with the new versions and changelog, preparing the next release. diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 118f02d0..1c5a0448 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -# This file was autogenerated by dist: https://opensource.axo.dev/cargo-dist/ +# This file was autogenerated by dist: https://axodotdev.github.io/cargo-dist # # Copyright 2022-2024, axodotdev # SPDX-License-Identifier: MIT or Apache-2.0 @@ -58,6 +58,7 @@ jobs: steps: - uses: actions/checkout@v4 with: + persist-credentials: false submodules: recursive - name: Install dist # we specify bash to get pipefail; it guards against the `curl` command @@ -117,6 +118,7 @@ jobs: git config --global core.longpaths true - uses: actions/checkout@v4 with: + persist-credentials: false submodules: recursive - name: Install Rust non-interactively if not already installed if: ${{ matrix.container }} @@ -179,6 +181,7 @@ jobs: steps: - uses: actions/checkout@v4 with: + persist-credentials: false submodules: recursive - name: Install cached dist uses: actions/download-artifact@v4 @@ -218,8 +221,8 @@ jobs: - plan - build-local-artifacts - build-global-artifacts - # Only run if we're "publishing", and only if local and global didn't fail (skipped is fine) - if: ${{ always() && needs.plan.outputs.publishing == 'true' && (needs.build-global-artifacts.result == 'skipped' || needs.build-global-artifacts.result == 'success') && (needs.build-local-artifacts.result == 'skipped' || needs.build-local-artifacts.result == 'success') }} + # Only run if we're "publishing", and only if plan, local and global didn't fail (skipped is fine) + if: ${{ always() && needs.plan.result == 'success' && needs.plan.outputs.publishing == 'true' && (needs.build-global-artifacts.result == 'skipped' || needs.build-global-artifacts.result == 'success') && (needs.build-local-artifacts.result == 'skipped' || needs.build-local-artifacts.result == 'success') }} env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} runs-on: "ubuntu-22.04" @@ -228,6 +231,7 @@ jobs: steps: - uses: actions/checkout@v4 with: + persist-credentials: false submodules: recursive - name: Install cached dist uses: actions/download-artifact@v4 @@ -321,4 +325,5 @@ jobs: steps: - uses: actions/checkout@v4 with: + persist-credentials: false submodules: recursive diff --git a/Cargo.toml b/Cargo.toml index de0d8181..32b4d437 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -146,7 +146,6 @@ lto = "thin" [workspace.metadata.dist] # The preferred dist version to use in CI (Cargo.toml SemVer syntax) cargo-dist-version = "0.30.3" -allow-dirty = ["ci"] # CI backends to support ci = "github" # The installers to generate for each app @@ -171,7 +170,7 @@ pr-run-mode = "upload" # Path that installers should place binaries in install-path = "CARGO_HOME" # Whether to install an updater program -install-updater = false +install-updater = true [workspace.metadata.dist.github-custom-runners] aarch64-unknown-linux-gnu = "ubuntu-24.04-arm"