ci: use default branch and simplify release-plz workflow - #79
notmandatory wants to merge 2 commits into
Conversation
Replace the hard-coded `master` branch check in the release-plz workflow with `github.event.repository.default_branch`. Update the workflow comments and CONTRIBUTING.md release instructions to refer to the default branch. Remove the explicit `release-pr`/`release` command choice and per-job conditionals so the workflow runs both jobs on the selected branch.
a910e6d to
ef5a33a
Compare
reez
left a comment
There was a problem hiding this comment.
Concept ACK
2 small comments/questions
| name: Publish Rust Release | ||
| runs-on: ubuntu-latest | ||
| if: ${{ github.repository_owner == 'bitcoindevkit' && inputs.command == 'release' }} | ||
| if: ${{ github.repository_owner == 'bitcoindevkit' }} |
There was a problem hiding this comment.
Without the command input doesn't this job now get queued for approval on every dispatch including the ones that only refresh the release PR?
At least I'm not seeing where release-plz checks that the PR was merged.
With the default release_always = true I feel like won't it publish whenever the version isn't on crates.io yet reviewed PR or not?
| uses: dtolnay/rust-toolchain@stable | ||
| with: | ||
| toolchain: ${{ matrix.rust.version }} | ||
| override: true |
There was a problem hiding this comment.
Does the MSRV job still build with 1.85.0 without this?
dtolnay only sets the rustup default and rust-toolchain.toml (channel = "stable") takes precedence over that I believe.
Would RUSTUP_TOOLCHAIN: ${{ matrix.rust.version }} at the job level fix it? Same for the test job.
Description
Replace the hard-coded
masterbranch check in the release-plz workflow withgithub.event.repository.default_branch. Update the workflow comments and CONTRIBUTING.md release instructions to refer to the default branch. Remove the explicitrelease-pr/releasecommand choice and per-job conditionals so the workflow runs both jobs on the selected branch.Notes to the reviewers
This should be the last change to the release workflow. I didn't want to make it completely automated since that would prevent us from starting the release workflow on different branches. Only one release can be active at one time per the release-plz tool.
I also fixed #78
Checklists
All Submissions:
cargo fmtandcargo clippybefore committing