ci: add a dry-run workflow to test rust releases#5292
ci: add a dry-run workflow to test rust releases#5292clason merged 2 commits intotree-sitter:masterfrom
Conversation
|
Running this as part of the release workflow would be the real value here, so I think it would make sense to invest more time into seeing if we can extract the part of the publish action that does this check. Actually, the release workflow is already too late -- this needs to be a regular workflow that is run on the "bump" commit (or any commit that updates the language crate). |
|
See also katyo/publish-crates#663 |
Couldn't we run it as part of the release workflow before the steps creating the releases (e.g. alongside the tests)? I'm not sure how we'd set up triggers for the workflow to only run on "bump" commits, and if we run it on every PR then it may get ignored. |
|
If it's part of the release workflow, it runs after we bumped and tagged -- so if we do need to bump the language crate, we can only do it after the bump, so we'd have to fix, bump, and tag again, same as now. As to how: we can gate this either behind the commit message (regex) or a label we apply to release commits. |
After spending a few too many hours on the xtask implementation, I think I agree with this approach. We may even be able to run the workflow with Solely so I can document this somewhere the xtask approach consisted mainly of the following:
The issue is that the |
4d9fc4f to
aca6ff9
Compare
|
I've added a new workflow, which is just the normal rust publishing job |
aca6ff9 to
7dc4595
Compare
|
I pushed a commit with a proposed release workflow listing individual steps. (It's a bit of a pity that we don't have any changelog or similar that could be edited for the minor release PR; we might want to put a nonce somewhere, e.g. in the README, for that purpose.) |
412410c to
b85172d
Compare
|
Going to merge this now as-is. This is an opt-in change and the docs are also a nice win to get in. If there's any followup issues we run into, further testing can be done on my fork before fixing in one PR. |
b85172d to
bca33c3
Compare
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin release-0.26
git worktree add -d .worktree/backport-5292-to-release-0.26 origin/release-0.26
cd .worktree/backport-5292-to-release-0.26
git switch --create backport-5292-to-release-0.26
git cherry-pick -x cf98b9b61e25eae57fc9a50f1a320620d43d319d d0714e0828e3c8a538e474707fb4cb31f3ef0c95 |
This is intended to be a manual safety check run locally before opening a PR to bump version numbers for a release.
Ideally this would check for changes to a crate if a version is already published so we could run this as part of the release ci job, but given that:
I've opted to keep the check a manual one and leave the decision to bump or not to the maintainer making the release.
Also includes a few related docs improvements.