diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml deleted file mode 100644 index 89d9e12..0000000 --- a/.github/workflows/release-please.yml +++ /dev/null @@ -1,21 +0,0 @@ -on: - push: - branches: - - main - -permissions: - contents: write - pull-requests: write - -name: Create Release - -jobs: - verify-release: - uses: ./.github/workflows/rust-package.yml - release-please: - needs: verify-release - runs-on: ubuntu-24.04 - steps: - - uses: googleapis/release-please-action@v4 - with: - release-type: rust \ No newline at end of file diff --git a/.github/workflows/release-plz.yml b/.github/workflows/release-plz.yml new file mode 100644 index 0000000..42f9a08 --- /dev/null +++ b/.github/workflows/release-plz.yml @@ -0,0 +1,52 @@ +name: Cargo Release +permissions: + pull-requests: write + contents: write +on: + push: + branches: + - main +jobs: + verify: + uses: ./.github/workflows/rust-package.yml + # Release unpublished packages. + release-plz-release: + needs: verify + name: Release-plz release + 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: release-plz/action@v0.5 + with: + command: release + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.RELEASE_PLEASE_CARGO }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # Create a PR with the new versions and changelog, preparing the next release. + release-plz-pr: + needs: verify + name: Release-plz PR + runs-on: ubuntu-latest + concurrency: + group: release-plz-${{ github.ref }} + cancel-in-progress: false + 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: release-plz/action@v0.5 + with: + command: release-pr + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.RELEASE_PLEASE_CARGO }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file