From 1700df92a9fdf305f6fc12ab26f209efb0957e77 Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 1 Oct 2024 22:46:38 +0200 Subject: [PATCH] Add release-plz and clean up workflows It's no secret that we're lacking behind on releases; partially, because they are slightly tedious to create. My hope is that this will be resolved by introducing `release-plz` [1], which is automates publication whenever we push to `master`. Along the way, I aligned the naming of the other workflows. [1]: https://github.com/MarcoIeni/release-plz --- .../{debug_build.yml => debug-build.yml} | 0 .../{release.yml => release-binary.yml} | 3 +- .github/workflows/release-plz.yml | 31 +++++++++++++++++++ .../{toc-generator.yml => update-toc.yml} | 0 4 files changed, 32 insertions(+), 2 deletions(-) rename .github/workflows/{debug_build.yml => debug-build.yml} (100%) rename .github/workflows/{release.yml => release-binary.yml} (99%) create mode 100644 .github/workflows/release-plz.yml rename .github/workflows/{toc-generator.yml => update-toc.yml} (100%) diff --git a/.github/workflows/debug_build.yml b/.github/workflows/debug-build.yml similarity index 100% rename from .github/workflows/debug_build.yml rename to .github/workflows/debug-build.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release-binary.yml similarity index 99% rename from .github/workflows/release.yml rename to .github/workflows/release-binary.yml index 5c87c17d46..172b19f686 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release-binary.yml @@ -5,7 +5,7 @@ # - Dockerfile-CI.alpine.Dockerfile # - https://github.com/lycheeverse/lychee-action/blob/master/action.yml -name: Release +name: Release Binary on: release: types: @@ -16,7 +16,6 @@ env: jobs: prepare: - name: Build release binary runs-on: ubuntu-latest outputs: tag_name: ${{ steps.get_release.outputs.tag_name }} diff --git a/.github/workflows/release-plz.yml b/.github/workflows/release-plz.yml new file mode 100644 index 0000000000..5e42ea8efc --- /dev/null +++ b/.github/workflows/release-plz.yml @@ -0,0 +1,31 @@ +# Release-plz pipeline for publishing +# a new GitHub + crates.io release + +name: Release-plz + +permissions: + pull-requests: write + contents: write + +on: + push: + branches: + - main + - master + +jobs: + release-plz: + name: Release-plz + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + - name: Run release-plz + uses: MarcoIeni/release-plz-action@v0.5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} diff --git a/.github/workflows/toc-generator.yml b/.github/workflows/update-toc.yml similarity index 100% rename from .github/workflows/toc-generator.yml rename to .github/workflows/update-toc.yml