diff --git a/.github/ISSUE_TEMPLATE/minor_release.md b/.github/ISSUE_TEMPLATE/minor_release.md deleted file mode 100644 index 83fc86ba0f..0000000000 --- a/.github/ISSUE_TEMPLATE/minor_release.md +++ /dev/null @@ -1,99 +0,0 @@ ---- -name: Minor Release -about: Create a new minor release [for release managers only] -title: 'Release MAJOR.MINOR+1.0' -labels: 'release' -assignees: '' - ---- - -## Create a new minor release - -### Summary - -<--release summary to be used in announcements--> - -### Commit - -<--latest commit ID to include in this release--> - -### Changelog - -<--add notices from PRs merged since the prior release, see ["keep a changelog"]--> - -### Checklist - -Release numbering must follow [Semantic Versioning]. These steps assume the current `master` -branch **development** version is *MAJOR.MINOR.0*. - -#### On the day of the feature freeze - -Change the `master` branch to the next MINOR+1 version: - -- [ ] Switch to the `master` branch. -- [ ] Create a new PR branch called `bump_dev_MAJOR_MINOR+1`, eg. `bump_dev_0_22`. -- [ ] Bump the `bump_dev_MAJOR_MINOR+1` branch to the next development MINOR+1 version. - - Change the `Cargo.toml` version value to `MAJOR.MINOR+1.0`. - - Update the `CHANGELOG.md` file. - - The commit message should be "Bump version to MAJOR.MINOR+1.0". -- [ ] Create PR and merge the `bump_dev_MAJOR_MINOR+1` branch to `master`. - - Title PR "Bump version to MAJOR.MINOR+1.0". - -Create a new release branch and release candidate tag: - -- [ ] Double check that your local `master` is up-to-date with the upstream repo. -- [ ] Create a new branch called `release/MAJOR.MINOR+1` from `master`. -- [ ] Bump the `release/MAJOR.MINOR+1` branch to `MAJOR.MINOR+1.0-rc.1` version. - - Change the `Cargo.toml` version value to `MAJOR.MINOR+1.0-rc.1`. - - The commit message should be "Bump version to MAJOR.MINOR+1.0-rc.1". -- [ ] Add a tag to the `HEAD` commit in the `release/MAJOR.MINOR+1` branch. - - The tag name should be `vMAJOR.MINOR+1.0-rc.1` - - Use message "Release MAJOR.MINOR+1.0 rc.1". - - Make sure the tag is signed, for extra safety use the explicit `--sign` flag. -- [ ] Push the `release/MAJOR.MINOR` branch and new tag to the `bitcoindevkit/bdk` repo. - - Use `git push --tags` option to push the new `vMAJOR.MINOR+1.0-rc.1` tag. - -If any issues need to be fixed before the *MAJOR.MINOR+1.0* version is released: - -- [ ] Merge fix PRs to the `master` branch. -- [ ] Git cherry-pick fix commits to the `release/MAJOR.MINOR+1` branch. -- [ ] Verify fixes in `release/MAJOR.MINOR+1` branch. -- [ ] Bump the `release/MAJOR.MINOR+1` branch to `MAJOR.MINOR+1.0-rc.x+1` version. - - Change the `Cargo.toml` version value to `MAJOR.MINOR+1.0-rc.x+1`. - - The commit message should be "Bump version to MAJOR.MINOR+1.0-rc.x+1". -- [ ] Add a tag to the `HEAD` commit in the `release/MAJOR.MINOR+1` branch. - - The tag name should be `vMAJOR.MINOR+1.0-rc.x+1`, where x is the current release candidate number. - - Use tag message "Release MAJOR.MINOR+1.0 rc.x+1". - - Make sure the tag is signed, for extra safety use the explicit `--sign` flag. -- [ ] Push the new tag to the `bitcoindevkit/bdk` repo. - - Use `git push --tags` option to push the new `vMAJOR.MINOR+1.0-rc.x+1` tag. - -#### On the day of the release - -Tag and publish new release: - -- [ ] Bump the `release/MAJOR.MINOR+1` branch to `MAJOR.MINOR+1.0` version. - - Change the `Cargo.toml` version value to `MAJOR.MINOR+1.0`. - - The commit message should be "Bump version to MAJOR.MINOR+1.0". -- [ ] Add a tag to the `HEAD` commit in the `release/MAJOR.MINOR+1` branch. - - The tag name should be `vMAJOR.MINOR+1.0` - - The first line of the tag message should be "Release MAJOR.MINOR+1.0". - - In the body of the tag message put a copy of the **Summary** and **Changelog** for the release. - - Make sure the tag is signed, for extra safety use the explicit `--sign` flag. -- [ ] Wait for the CI to finish one last time. -- [ ] Push the new tag to the `bitcoindevkit/bdk` repo. -- [ ] Publish **all** the updated crates to crates.io. -- [ ] Create the release on GitHub. - - Go to "tags", click on the dots on the right and select "Create Release". - - Set the title to `Release MAJOR.MINOR+1.0`. - - In the release notes body put the **Summary** and **Changelog**. - - Use the "+ Auto-generate release notes" button to add details from included PRs. - - Until we reach a `1.0.0` release check the "Pre-release" box. -- [ ] Make sure the new release shows up on [crates.io] and that the docs are built correctly on [docs.rs]. -- [ ] Announce the release, using the **Summary**, on Discord, Twitter and Mastodon. -- [ ] Celebrate 🎉 - -[Semantic Versioning]: https://semver.org/ -[crates.io]: https://crates.io/crates/bdk -[docs.rs]: https://docs.rs/bdk/latest/bdk -["keep a changelog"]: https://keepachangelog.com/en/1.0.0/ diff --git a/.github/ISSUE_TEMPLATE/patch_release.md b/.github/ISSUE_TEMPLATE/patch_release.md deleted file mode 100644 index 261da24b48..0000000000 --- a/.github/ISSUE_TEMPLATE/patch_release.md +++ /dev/null @@ -1,71 +0,0 @@ ---- -name: Patch Release -about: Create a new patch release [for release managers only] -title: 'Release MAJOR.MINOR.PATCH+1' -labels: 'release' -assignees: '' - ---- - -## Create a new patch release - -### Summary - -<--release summary to be used in announcements--> - -### Commit - -<--latest commit ID to include in this release--> - -### Changelog - -<--add notices from PRs merged since the prior release, see ["keep a changelog"]--> - -### Checklist - -Release numbering must follow [Semantic Versioning]. These steps assume the current `master` -branch **development** version is *MAJOR.MINOR.PATCH*. - -### On the day of the patch release - -Change the `master` branch to the new PATCH+1 version: - -- [ ] Switch to the `master` branch. -- [ ] Create a new PR branch called `bump_dev_MAJOR_MINOR_PATCH+1`, eg. `bump_dev_0_22_1`. -- [ ] Bump the `bump_dev_MAJOR_MINOR` branch to the next development PATCH+1 version. - - Change the `Cargo.toml` version value to `MAJOR.MINOR.PATCH+1`. - - Update the `CHANGELOG.md` file. - - The commit message should be "Bump version to MAJOR.MINOR.PATCH+1". -- [ ] Create PR and merge the `bump_dev_MAJOR_MINOR_PATCH+1` branch to `master`. - - Title PR "Bump version to MAJOR.MINOR.PATCH+1". - -Cherry-pick, tag and publish new PATCH+1 release: - -- [ ] Merge fix PRs to the `master` branch. -- [ ] Git cherry-pick fix commits to the `release/MAJOR.MINOR` branch to be patched. -- [ ] Verify fixes in `release/MAJOR.MINOR` branch. -- [ ] Bump the `release/MAJOR.MINOR.PATCH+1` branch to `MAJOR.MINOR.PATCH+1` version. - - Change the `Cargo.toml` version value to `MAJOR.MINOR.MINOR.PATCH+1`. - - The commit message should be "Bump version to MAJOR.MINOR.PATCH+1". -- [ ] Add a tag to the `HEAD` commit in the `release/MAJOR.MINOR` branch. - - The tag name should be `vMAJOR.MINOR.PATCH+1` - - The first line of the tag message should be "Release MAJOR.MINOR.PATCH+1". - - In the body of the tag message put a copy of the **Summary** and **Changelog** for the release. - - Make sure the tag is signed, for extra safety use the explicit `--sign` flag. -- [ ] Wait for the CI to finish one last time. -- [ ] Push the new tag to the `bitcoindevkit/bdk` repo. -- [ ] Publish **all** the updated crates to crates.io. -- [ ] Create the release on GitHub. - - Go to "tags", click on the dots on the right and select "Create Release". - - Set the title to `Release MAJOR.MINOR.PATCH+1`. - - In the release notes body put the **Summary** and **Changelog**. - - Use the "+ Auto-generate release notes" button to add details from included PRs. - - Until we reach a `1.0.0` release check the "Pre-release" box. -- [ ] Make sure the new release shows up on [crates.io] and that the docs are built correctly on [docs.rs]. -- [ ] Announce the release, using the **Summary**, on Discord, Twitter and Mastodon. -- [ ] Celebrate 🎉 - -[Semantic Versioning]: https://semver.org/ -[crates.io]: https://crates.io/crates/bdk -[docs.rs]: https://docs.rs/bdk/latest/bdk -["keep a changelog"]: https://keepachangelog.com/en/1.0.0/ diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index a9bcabef05..47de71c0de 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -9,11 +9,6 @@ -### Changelog notice - - - - ### Checklists #### All Submissions: diff --git a/.github/workflows/code_coverage.yml b/.github/workflows/code_coverage.yml index afc088f83e..20e06b2881 100644 --- a/.github/workflows/code_coverage.yml +++ b/.github/workflows/code_coverage.yml @@ -23,7 +23,7 @@ jobs: - name: Install lcov tools run: sudo apt-get install lcov -y - name: Install Rust toolchain - uses: actions-rust-lang/setup-rust-toolchain@v1 + uses: actions-rust-lang/setup-rust-toolchain@v2 with: toolchain: nightly-2025-11-27 components: llvm-tools-preview diff --git a/.github/workflows/cont_integration.yml b/.github/workflows/cont_integration.yml index e4e788f067..5032864f00 100644 --- a/.github/workflows/cont_integration.yml +++ b/.github/workflows/cont_integration.yml @@ -27,10 +27,11 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - uses: actions-rust-lang/setup-rust-toolchain@v1 + - uses: actions-rust-lang/setup-rust-toolchain@v2 with: toolchain: 1.85.0 # MSRV cache: true + rustflags: "-D warnings" - name: Pin dependencies for MSRV run: ./ci/pin-msrv.sh - name: Build 1.85.0 (no default features) @@ -50,10 +51,11 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - uses: actions-rust-lang/setup-rust-toolchain@v1 + - uses: actions-rust-lang/setup-rust-toolchain@v2 with: toolchain: ${{ needs.prepare.outputs.rust_version }} cache: true + rustflags: "-D warnings" - name: Build (default features) run: cargo build - name: Build (no default features) @@ -77,10 +79,11 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - uses: actions-rust-lang/setup-rust-toolchain@v1 + - uses: actions-rust-lang/setup-rust-toolchain@v2 with: toolchain: ${{ needs.prepare.outputs.rust_version }} cache: true + rustflags: "-D warnings" - name: Build (default features) run: cargo build - name: Build (no default features) @@ -108,10 +111,11 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - uses: actions-rust-lang/setup-rust-toolchain@v1 + - uses: actions-rust-lang/setup-rust-toolchain@v2 with: toolchain: ${{ needs.prepare.outputs.rust_version }} cache: true + rustflags: "-D warnings" - name: Build (default features) run: cargo build - name: Build (no default features) @@ -135,10 +139,11 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - uses: actions-rust-lang/setup-rust-toolchain@v1 + - uses: actions-rust-lang/setup-rust-toolchain@v2 with: toolchain: ${{ needs.prepare.outputs.rust_version }} cache: true + rustflags: "-D warnings" - name: Build (default features) run: cargo build - name: Build (use-rustls) @@ -164,10 +169,11 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - uses: actions-rust-lang/setup-rust-toolchain@v1 + - uses: actions-rust-lang/setup-rust-toolchain@v2 with: toolchain: ${{ needs.prepare.outputs.rust_version }} cache: true + rustflags: "-D warnings" - name: Build (default features) run: cargo build - name: Build (no default features) @@ -199,10 +205,11 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - uses: actions-rust-lang/setup-rust-toolchain@v1 + - uses: actions-rust-lang/setup-rust-toolchain@v2 with: toolchain: ${{ needs.prepare.outputs.rust_version }} cache: true + rustflags: "-D warnings" - name: Build (default features) run: cargo build - name: Test (all features) @@ -220,10 +227,11 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - uses: actions-rust-lang/setup-rust-toolchain@v1 + - uses: actions-rust-lang/setup-rust-toolchain@v2 with: toolchain: ${{ needs.prepare.outputs.rust_version }} cache: true + rustflags: "-D warnings" - name: Build (default features) run: cargo build - name: Build (no default features) @@ -252,11 +260,12 @@ jobs: - run: sudo apt-get update || exit 1 - run: sudo apt-get install -y libclang-common-14-dev clang-14 libc6-dev-i386 || exit 1 - name: Install Rust toolchain - uses: actions-rust-lang/setup-rust-toolchain@v1 + uses: actions-rust-lang/setup-rust-toolchain@v2 with: toolchain: ${{ needs.prepare.outputs.rust_version }} cache: true target: "wasm32-unknown-unknown" + rustflags: "-D warnings" - name: Check esplora working-directory: ./crates/esplora run: cargo check --target wasm32-unknown-unknown --no-default-features --features bdk_core/hashbrown,async @@ -270,10 +279,11 @@ jobs: uses: actions/checkout@v7 with: persist-credentials: false - - uses: actions-rust-lang/setup-rust-toolchain@v1 + - uses: actions-rust-lang/setup-rust-toolchain@v2 with: toolchain: ${{ needs.prepare.outputs.rust_version }} cache: true + rustflags: "-D warnings" # TODO: `--target thumbv6m-none-eabi` should work but currently does not # target: thumbv6m-none-eabi - name: Check bdk_core (no-std, hashbrown) @@ -292,7 +302,7 @@ jobs: with: persist-credentials: false - name: Install Rust toolchain - uses: actions-rust-lang/setup-rust-toolchain@v1 + uses: actions-rust-lang/setup-rust-toolchain@v2 with: toolchain: nightly cache: true @@ -311,11 +321,12 @@ jobs: with: persist-credentials: false - name: Install Rust toolchain - uses: actions-rust-lang/setup-rust-toolchain@v1 + uses: actions-rust-lang/setup-rust-toolchain@v2 with: toolchain: ${{ needs.prepare.outputs.rust_version }} cache: true components: clippy + rustflags: "-D warnings" - name: Check clippy run: cargo clippy --all-features --all-targets -- -D warnings @@ -329,9 +340,10 @@ jobs: with: persist-credentials: false - name: Install Rust toolchain - uses: actions-rust-lang/setup-rust-toolchain@v1 + uses: actions-rust-lang/setup-rust-toolchain@v2 with: toolchain: ${{ needs.prepare.outputs.rust_version }} cache: true + rustflags: "-D warnings" - name: Check docs run: RUSTDOCFLAGS='-D warnings' cargo doc --workspace --all-features --no-deps diff --git a/.github/workflows/release-plz.yml b/.github/workflows/release-plz.yml new file mode 100644 index 0000000000..9e1be77f8a --- /dev/null +++ b/.github/workflows/release-plz.yml @@ -0,0 +1,124 @@ +name: Release-plz + +# How this works (see https://release-plz.dev/docs/github/quickstart): +# +# This workflow is triggered manually only (Actions -> "Release-plz" -> "Run +# workflow"). Select the branch to release from in the "Use workflow from" +# dropdown (the default branch or a `release/*` branch) and click "Run +# workflow". Both jobs below run on every dispatch: +# +# 1. The `release-pr` job opens/updates a release PR (branch prefix `release-plz-`) +# with the version bumps and changelog updates for every changed workspace +# crate, targeting the selected branch, authored by the +# `bitcoindevkit-release-plz` GitHub App. The version bump for each crate is +# computed from that branch's Cargo.toml. Re-run it to refresh the release PR +# after new commits land on the branch. +# 2. The `release` job checks whether the release PR has been merged. If so, it +# publishes every unpublished crate to crates.io (via trusted publishing / +# OIDC, no token secret), creates a `-` git tag for each +# crate, and creates the matching GitHub releases. +# The job runs in the `release` GitHub environment, whose required reviewers +# are defined in the GitHub repository config; publishing waits until an +# authorized GitHub user approves it in the Actions UI. +# +# Notes: +# - release-plz supports only one open release PR per repository, so don't +# prepare releases on two branches concurrently. +# - release-plz uses crates.io as the version baseline. Don't run it on a branch +# whose crate versions are behind the versions already published on crates.io. +# - crates.io trusted publishing must be configured for every workspace crate +# with this workflow name and the `release` environment. + +on: + workflow_dispatch: + +permissions: {} + +jobs: + # Create or update the PR with the new versions and changelogs. + release-pr: + name: Create/Update Rust Release PR + runs-on: ubuntu-latest + if: ${{ github.repository_owner == 'bitcoindevkit' }} + permissions: + contents: write # push the release PR branch + pull-requests: write # open and update the release PR + concurrency: + group: release-plz-${{ github.ref_name }} + cancel-in-progress: false + steps: + - name: Validate selected branch + env: + BRANCH: ${{ github.ref_name }} + DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} + run: | + case "$BRANCH" in + "$DEFAULT_BRANCH"|release/*) ;; + *) echo "Refusing to release from '$BRANCH' (expected '$DEFAULT_BRANCH' or 'release/*')"; exit 1 ;; + esac + - name: Generate GitHub App token + id: app-token + uses: actions/create-github-app-token@v3 + with: + app-id: ${{ secrets.RELEASE_PLZ_APP_ID }} + private-key: ${{ secrets.RELEASE_PLZ_PRIVATE_KEY }} + - name: Checkout repository + uses: actions/checkout@v7 + with: + ref: ${{ github.ref_name }} + fetch-depth: 0 + persist-credentials: false + - name: Install Rust toolchain + uses: actions-rust-lang/setup-rust-toolchain@v2 + - name: Run release-plz + uses: release-plz/action@v0.5 + with: + command: release-pr + env: + GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} + + # If the release PR was merged, publish every unpublished crate to crates.io, + # tag it, and create its GitHub release. Gated by the `release` environment + # (team approval). + release: + name: Publish Rust Release + runs-on: ubuntu-latest + if: ${{ github.repository_owner == 'bitcoindevkit' }} + environment: release + permissions: + contents: write # push tags and create GitHub releases + pull-requests: read # detect the merged release PR + id-token: write # crates.io trusted publishing (OIDC) + steps: + - name: Validate selected branch + env: + BRANCH: ${{ github.ref_name }} + DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} + run: | + case "$BRANCH" in + "$DEFAULT_BRANCH"|release/*) ;; + *) echo "Refusing to release from '$BRANCH' (expected '$DEFAULT_BRANCH' or 'release/*')"; exit 1 ;; + esac + - name: Generate GitHub App token + id: app-token + uses: actions/create-github-app-token@v3 + with: + app-id: ${{ secrets.RELEASE_PLZ_APP_ID }} + private-key: ${{ secrets.RELEASE_PLZ_PRIVATE_KEY }} + - name: Checkout repository + uses: actions/checkout@v7 + with: + ref: ${{ github.ref_name }} + fetch-depth: 0 + persist-credentials: false + - name: Install Rust toolchain + uses: actions-rust-lang/setup-rust-toolchain@v2 + - name: Run release-plz + uses: release-plz/action@v0.5 + with: + command: release + env: + GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} + # No CARGO_REGISTRY_TOKEN on purpose: crates.io trusted publishing is + # configured for every workspace crate, this repo, this workflow, and + # the `release` environment. diff --git a/.github/zizmor.yml b/.github/zizmor.yml index 165a180d8b..e88456d35a 100644 --- a/.github/zizmor.yml +++ b/.github/zizmor.yml @@ -7,3 +7,4 @@ rules: actions-rust-lang/setup-rust-toolchain: ref-pin actions/*: ref-pin github/codeql-action/*: ref-pin + release-plz/action: ref-pin diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 85d157d436..c9002158cd 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -49,7 +49,7 @@ hesitate to split it into multiple small, focused PRs. The Minimum Supported Rust Version is **1.85.0** (enforced by our CI). Commits should cover both the issue fixed and the solution's rationale. -These [guidelines](https://chris.beams.io/posts/git-commit/) should be kept in mind. Commit messages follow the ["Conventional Commits 1.0.0"](https://www.conventionalcommits.org/en/v1.0.0/) to make commit histories easier to read by humans and automated tools. All commits must be [GPG signed](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits). +These [guidelines](https://chris.beams.io/posts/git-commit/) should be kept in mind. Commit messages follow the ["Conventional Commits 1.0.0"](https://www.conventionalcommits.org/en/v1.0.0/) to make commit histories easier to read by humans and automated tools. release-plz uses these commit messages to generate each crate's changelog and infer the next version, so use a meaningful type and scope and mark breaking changes with `!`. All commits must be [GPG signed](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits). To facilitate communication with other contributors, the project is making use of GitHub's "assignee" field. First check that no one is assigned and then diff --git a/DEVELOPMENT_CYCLE.md b/DEVELOPMENT_CYCLE.md index 11e7a26841..3605a66f10 100644 --- a/DEVELOPMENT_CYCLE.md +++ b/DEVELOPMENT_CYCLE.md @@ -2,7 +2,7 @@ This project follows a regular releasing schedule similar to the one [used by the Rust language]. In short, this means that a new release is made at a regular cadence, with all the feature/bugfixes that made it to `master` in time. This ensures that we don't keep delaying releases waiting for "just one more little thing". -This project uses [Semantic Versioning], but is currently at MAJOR version zero (0.y.z) meaning it is still in initial development. Anything MAY change at any time. The public API SHOULD NOT be considered stable. Until we reach version `1.0.0` we will do our best to document any breaking API changes in the changelog info attached to each release tag. +This project uses [Semantic Versioning], but is currently at MAJOR version zero (0.y.z) meaning it is still in initial development. Anything MAY change at any time. The public API SHOULD NOT be considered stable. Until we reach version `1.0.0` we will do our best to document any breaking API changes in the changelog info attached to each release. We decided to maintain a faster release cycle while the library is still in "beta", i.e. before release `1.0.0`: since we are constantly adding new features and, even more importantly, fixing issues, we want developers to have access to those updates as fast as possible. For this reason we will make a release **every 4 weeks**. @@ -10,7 +10,24 @@ Once the project reaches a more mature state (>= `1.0.0`), we will very likely s The "feature freeze" will happen **one week before the release date**. This means a new branch will be created originating from the `master` tip at that time, and in that branch we will stop adding new features and only focus on ensuring the ones we've added are working properly. -To create a new release a release manager will create a new issue using the `Release` template and follow the template instructions. +## Releasing + +Releases are prepared and published with [release-plz] from the **Release-plz** GitHub Actions workflow. The workflow is triggered manually from the branch to release: `master` for regular releases or a `release/*` branch for patch and pre-releases. + +1. Trigger the **Release-plz** workflow on the branch. The `release-pr` job opens or updates a release PR containing the version bumps and `CHANGELOG.md` changes for every workspace crate that has changes. +2. Review the release PR. Changelogs are generated from [Conventional Commits], so do not edit them by hand. Merge the PR once CI passes. +3. Trigger the **Release-plz** workflow again on the same branch. The `release` job publishes every unpublished crate to crates.io, pushes a `-` tag for each crate, and creates the matching GitHub release. A reviewer must approve the `release` environment before publishing starts. +4. Verify the new versions on crates.io and docs.rs, then announce the release. + +release-plz supports only one open release PR per repository, so do not prepare releases on two branches at the same time. + +For a patch release, cherry-pick the fixes onto the appropriate `release/*` branch before triggering the workflow. Make sure the crate versions on the selected branch are not behind the versions already published on crates.io; release-plz uses crates.io as its baseline. + +Before the `release` job can publish, [crates.io trusted publishing] must be configured for every workspace crate with workflow name `release-plz.yml` and environment `release`. + +[release-plz]: https://release-plz.dev +[Conventional Commits]: https://www.conventionalcommits.org +[crates.io trusted publishing]: https://crates.io/docs/trusted-publishing [used by the Rust language]: https://doc.rust-lang.org/book/appendix-07-nightly-rust.html [Semantic Versioning]: https://semver.org/ diff --git a/crates/bitcoind_rpc/CHANGELOG.md b/crates/bitcoind_rpc/CHANGELOG.md index 7b3fa60c85..59edb31639 100644 --- a/crates/bitcoind_rpc/CHANGELOG.md +++ b/crates/bitcoind_rpc/CHANGELOG.md @@ -2,7 +2,7 @@ All notable changes to this project can be found here and in each release's git tag and can be viewed with `git tag -ln100 "v*"`. See also [DEVELOPMENT_CYCLE.md](../../DEVELOPMENT_CYCLE.md) for more details. -Contributors do not need to change this file but do need to add changelog details in their PR descriptions. The person making the next release will collect changelog details from included PRs and edit this file prior to each release. +This file is updated automatically by [release-plz](https://release-plz.dev) from [Conventional Commits](https://www.conventionalcommits.org/). Do not edit it manually. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). diff --git a/crates/chain/CHANGELOG.md b/crates/chain/CHANGELOG.md index fa14c126dd..eab1385dd6 100644 --- a/crates/chain/CHANGELOG.md +++ b/crates/chain/CHANGELOG.md @@ -2,7 +2,7 @@ All notable changes to this project can be found here and in each release's git tag and can be viewed with `git tag -ln100 "v*"`. See also [DEVELOPMENT_CYCLE.md](../../DEVELOPMENT_CYCLE.md) for more details. -Contributors do not need to change this file but do need to add changelog details in their PR descriptions. The person making the next release will collect changelog details from included PRs and edit this file prior to each release. +This file is updated automatically by [release-plz](https://release-plz.dev) from [Conventional Commits](https://www.conventionalcommits.org/). Do not edit it manually. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). diff --git a/crates/core/CHANGELOG.md b/crates/core/CHANGELOG.md index 6ec7da00fe..ad60a0a3cc 100644 --- a/crates/core/CHANGELOG.md +++ b/crates/core/CHANGELOG.md @@ -2,7 +2,7 @@ All notable changes to this project can be found here and in each release's git tag and can be viewed with `git tag -ln100 "v*"`. See also [DEVELOPMENT_CYCLE.md](../../DEVELOPMENT_CYCLE.md) for more details. -Contributors do not need to change this file but do need to add changelog details in their PR descriptions. The person making the next release will collect changelog details from included PRs and edit this file prior to each release. +This file is updated automatically by [release-plz](https://release-plz.dev) from [Conventional Commits](https://www.conventionalcommits.org/). Do not edit it manually. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). diff --git a/crates/electrum/CHANGELOG.md b/crates/electrum/CHANGELOG.md index dae8019a1c..07e1b055f2 100644 --- a/crates/electrum/CHANGELOG.md +++ b/crates/electrum/CHANGELOG.md @@ -2,7 +2,7 @@ All notable changes to this project can be found here and in each release's git tag and can be viewed with `git tag -ln100 "v*"`. See also [DEVELOPMENT_CYCLE.md](../../DEVELOPMENT_CYCLE.md) for more details. -Contributors do not need to change this file but do need to add changelog details in their PR descriptions. The person making the next release will collect changelog details from included PRs and edit this file prior to each release. +This file is updated automatically by [release-plz](https://release-plz.dev) from [Conventional Commits](https://www.conventionalcommits.org/). Do not edit it manually. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). diff --git a/crates/esplora/CHANGELOG.md b/crates/esplora/CHANGELOG.md index 1f246b0f0c..caf702a607 100644 --- a/crates/esplora/CHANGELOG.md +++ b/crates/esplora/CHANGELOG.md @@ -2,7 +2,7 @@ All notable changes to this project can be found here and in each release's git tag and can be viewed with `git tag -ln100 "v*"`. See also [DEVELOPMENT_CYCLE.md](../../DEVELOPMENT_CYCLE.md) for more details. -Contributors do not need to change this file but do need to add changelog details in their PR descriptions. The person making the next release will collect changelog details from included PRs and edit this file prior to each release. +This file is updated automatically by [release-plz](https://release-plz.dev) from [Conventional Commits](https://www.conventionalcommits.org/). Do not edit it manually. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). diff --git a/crates/file_store/CHANGELOG.md b/crates/file_store/CHANGELOG.md index 8d8569bced..7f047dd959 100644 --- a/crates/file_store/CHANGELOG.md +++ b/crates/file_store/CHANGELOG.md @@ -2,7 +2,7 @@ All notable changes to this project can be found here and in each release's git tag and can be viewed with `git tag -ln100 "v*"`. See also [DEVELOPMENT_CYCLE.md](../../DEVELOPMENT_CYCLE.md) for more details. -Contributors do not need to change this file but do need to add changelog details in their PR descriptions. The person making the next release will collect changelog details from included PRs and edit this file prior to each release. +This file is updated automatically by [release-plz](https://release-plz.dev) from [Conventional Commits](https://www.conventionalcommits.org/). Do not edit it manually. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). diff --git a/crates/testenv/CHANGELOG.md b/crates/testenv/CHANGELOG.md index 908b707e6f..c73d24a261 100644 --- a/crates/testenv/CHANGELOG.md +++ b/crates/testenv/CHANGELOG.md @@ -2,7 +2,7 @@ All notable changes to this project can be found here and in each release's git tag and can be viewed with `git tag -ln100 "v*"`. See also [DEVELOPMENT_CYCLE.md](../../DEVELOPMENT_CYCLE.md) for more details. -Contributors do not need to change this file but do need to add changelog details in their PR descriptions. The person making the next release will collect changelog details from included PRs and edit this file prior to each release. +This file is updated automatically by [release-plz](https://release-plz.dev) from [Conventional Commits](https://www.conventionalcommits.org/). Do not edit it manually. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). diff --git a/release-plz.toml b/release-plz.toml new file mode 100644 index 0000000000..5f702e0106 --- /dev/null +++ b/release-plz.toml @@ -0,0 +1,41 @@ +[workspace] +# Existing bdk release tags use the crate name without the `bdk_` prefix, for +# example `chain-0.23.4`. Keep the same scheme so release-plz can find the +# previous release and GitHub releases stay consistent. +git_tag_name = '{{ package | replace(from="bdk_", to="") }}-{{ version }}' +git_release_name = '{{ package | replace(from="bdk_", to="") }}-{{ version }}' +# Mark `-rc.N` and other pre-release versions as GitHub pre-releases. +git_release_type = "auto" +# Only publish after a release PR has been merged. +release_always = false +# Keep the label exempted by the stale-issue workflow. +pr_labels = ["release"] + +# release-plz stores a separate changelog next to each crate's Cargo.toml. +[[package]] +name = "bdk_chain" +changelog_path = "crates/chain/CHANGELOG.md" + +[[package]] +name = "bdk_core" +changelog_path = "crates/core/CHANGELOG.md" + +[[package]] +name = "bdk_bitcoind_rpc" +changelog_path = "crates/bitcoind_rpc/CHANGELOG.md" + +[[package]] +name = "bdk_electrum" +changelog_path = "crates/electrum/CHANGELOG.md" + +[[package]] +name = "bdk_esplora" +changelog_path = "crates/esplora/CHANGELOG.md" + +[[package]] +name = "bdk_file_store" +changelog_path = "crates/file_store/CHANGELOG.md" + +[[package]] +name = "bdk_testenv" +changelog_path = "crates/testenv/CHANGELOG.md"