Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 0 additions & 68 deletions .github/ISSUE_TEMPLATE/minor_release.md

This file was deleted.

7 changes: 0 additions & 7 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@
<!-- In this section you can include notes directed to the reviewers, like explaining why some parts
of the PR were done in a specific way -->

## Changelog notice

<!-- Notice the release manager should include in the release tag message changelog -->
<!-- See https://keepachangelog.com/en/1.0.0/ for examples -->

### Checklists

#### All Submissions:
Expand All @@ -26,10 +21,8 @@ of the PR were done in a specific way -->

* [ ] I've added tests for the new feature
* [ ] I've added docs for the new feature
* [ ] I've updated `CHANGELOG.md`

#### Bugfixes:

* [ ] This pull request breaks the existing API
* [ ] I've added tests to reproduce the issue which are now passing
* [ ] I'm linking the issue being fixed by this PR
2 changes: 1 addition & 1 deletion .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
security_audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- uses: actions-rust-lang/audit@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/code_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v7
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: stable
components: llvm-tools-preview
Expand All @@ -32,7 +32,7 @@ jobs:
- name: Check lcov.info
run: cat ./coverage/lcov.info
- name: Upload to Codecov
uses: codecov/codecov-action@v5
uses: codecov/codecov-action@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
files: ./coverage/lcov.info
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/cont_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:
- --all-features
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v7
- name: Setup Rust Toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
uses: actions-rust-lang/setup-rust-toolchain@v2
with:
toolchain: ${{ matrix.rust }}
profile: minimal
Expand All @@ -44,10 +44,10 @@ jobs:
- --all-features
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v7

- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
uses: actions-rust-lang/setup-rust-toolchain@v2
with:
toolchain: stable
profile: minimal
Expand Down Expand Up @@ -97,9 +97,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@v7
- name: Setup Rust Toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
uses: actions-rust-lang/setup-rust-toolchain@v2
with:
toolchain: stable
profile: minimal
Expand Down
116 changes: 116 additions & 0 deletions .github/workflows/release-plz.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
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 (e.g. the default branch or `release/1.x`) 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 bump and changelog for updated crates, 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 the crate to crates.io (via trusted publishing / OIDC, no token
# secret) and creates the `vX.Y.Z` git tag and GitHub release.
# 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.

on:
workflow_dispatch:

permissions: {}

jobs:
# Create or update the PR with the new version and changelog.
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 to crates.io, tag, and create the
# 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 this repo + workflow + the `release` environment.
2 changes: 1 addition & 1 deletion DEVELOPMENT_CYCLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ 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.
To create a new release a release manager will trigger the `release-plz` workflow to create a new release PR, review and approve it, and then trigger the `release-plz` workflow again to publish it to `crates.io`.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the release templates will no longer be used, do we update them to contain the steps in triggering the workflow or we will delete them?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I've removed the minor_release.md template since we don't need it. We should still create a summary for posting about releases on social media, but that can be done ad-hoc for now. I've found trying to use one summary everywhere didn't really work anyway.


[used by the Rust language]: https://doc.rust-lang.org/book/appendix-07-nightly-rust.html
[Semantic Versioning]: https://semver.org/
Loading