From 744757aaa13061736c699309efa5e5e8253750b8 Mon Sep 17 00:00:00 2001 From: konstin Date: Mon, 9 Feb 2026 13:29:48 +0100 Subject: [PATCH] Modernize release-plz setup --- .github/workflows/release-plz.yml | 46 +++++++++++++++++++++++-------- Cargo.toml | 2 +- 2 files changed, 36 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release-plz.yml b/.github/workflows/release-plz.yml index 85bd88f..fd51a16 100644 --- a/.github/workflows/release-plz.yml +++ b/.github/workflows/release-plz.yml @@ -1,27 +1,51 @@ name: Release-plz -permissions: - pull-requests: write - contents: write - on: push: branches: - main jobs: - release-plz: - name: Release-plz + release-plz-release: + name: Release-plz release runs-on: ubuntu-latest + if: ${{ github.repository_owner == 'astral-sh' }} + permissions: + contents: write + id-token: write steps: - - name: Checkout repository - uses: actions/checkout@v4 + - &checkout + name: Checkout repository + uses: actions/checkout@v6 with: fetch-depth: 0 - - name: Install Rust toolchain + persist-credentials: true + - &install-rust + name: Install Rust toolchain uses: dtolnay/rust-toolchain@stable - name: Run release-plz - uses: MarcoIeni/release-plz-action@v0.5 + uses: release-plz/action@v0.5 + with: + command: release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + release-plz-pr: + name: Release-plz PR + runs-on: ubuntu-latest + if: ${{ github.repository_owner == 'astral-sh' }} + permissions: + pull-requests: write + contents: write + concurrency: + group: release-plz-${{ github.ref }} + cancel-in-progress: false + steps: + - *checkout + - *install-rust + - name: Run release-plz + uses: release-plz/action@v0.5 + with: + command: release-pr env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index b8a95c2..070ded6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ version = "0.10.0" edition = "2021" description = "A library for streaming reading of files over HTTP using range requests" license = "MIT" -repository = "https://github.com/prefix-dev/async_http_range_reader" +repository = "https://github.com/astral-sh/async_http_range_reader" exclude = ["test-data/*"] [lib]