From 9cd90a55bac498c8a2944d54b473bd6011b0bd91 Mon Sep 17 00:00:00 2001 From: Aetf Date: Fri, 26 Apr 2024 01:34:08 -0700 Subject: [PATCH] ci: use release-plz --- .github/workflows/publish.yml | 37 +++++++++++++++++------------------ 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9daabab..395ab45 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,28 +1,27 @@ -name: Publish to crates.io +name: Release-plz + +permissions: + pull-requests: write + contents: write on: push: - # Enable when testing release infrastructure on a branch. branches: - - build - tags: - - 'v[0-9]+.[0-9]+.[0-9]+' + - master jobs: - publish: + release-plz: + name: Release-plz runs-on: ubuntu-latest - permissions: - contents: write - env: - RUSTFLAGS: --allow unknown-lints --deny warnings steps: - - name: Setup Rust - uses: dtolnay/rust-toolchain@master - with: - toolchain: stable - - uses: actions/checkout@v4 - - uses: katyo/publish-crates@v2 + - name: Checkout repository + uses: actions/checkout@v4 with: - registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} - dry-run: ${{ !startsWith(github.ref, 'refs/tags/') }} - + 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 }}