Skip to content

Commit 00feefe

Browse files
authored
Change the bump-version workflow's schedule (#3512)
* Change the bump-version workflow's schedule Either I don't understand cron or GitHub doesn't understand cron. It's not clear which. I think that #3511 may have fallen within our schedule but it was supposed to be on a weekday. Otherwise #3499 was certainly spurious. This commit moves to a simpler "just do it on the same day each month" and we can manually figure out weekdays and such. Hopefully this should reduce the number of spurious PRs we're getting to bump versions. This also removes the script to force a version bump since I found a button on the GitHub UI to do the same thing. Additionally I've updated the patch-release documentation to use this button. Note that this button takes inputs as well which means we can further automate patch releases to look even more like normal release process, differing only in one part of the argument used to trigger the workflow. * Fix a typo
1 parent 12bfbdf commit 00feefe

3 files changed

Lines changed: 27 additions & 37 deletions

File tree

.github/workflows/bump-version.yml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,19 @@
1111
name: "Bump version number"
1212
on:
1313
schedule:
14-
# “At 00:00 on every day-of-month from 8 through 14 and on Monday.”
14+
# “At 00:00 on day-of-month 5.”
1515
#
16-
# https://crontab.guru/#0_0_8-14_*_1
17-
- cron: '0 0 8-14 * 1'
16+
# https://crontab.guru/#0_0_5_*_*
17+
- cron: '0 0 5 * *'
1818

19-
# Allow manually triggering this workflow remotely via a curl request,
20-
# described at
21-
# https://docs.github.com/en/rest/reference/actions#create-a-workflow-dispatch-event
22-
#
23-
# Note that this can be also triggered by running the script in
24-
# `ci/force-ci-bump-version.sh`
19+
# Allow manually triggering this request via the button at
20+
# https://github.com/bytecodealliance/wasmtime/actions/workflows/bump-version.yml
2521
workflow_dispatch:
22+
inputs:
23+
publish_cmd:
24+
description: 'Publish script argument: "bump" or "bump-patch"'
25+
required: false
26+
default: 'bump'
2627

2728
jobs:
2829
bump_version:
@@ -36,7 +37,13 @@ jobs:
3637
id: bump
3738
run: |
3839
rustc scripts/publish.rs
39-
./publish bump
40+
if [ "${{ github.event.inputs.publish_cmd }}" != "" ]; then
41+
# this was manually triggered
42+
./publish ${{ github.event.inputs.publish_cmd }}
43+
else
44+
# this was cron-triggered.
45+
./publish bump
46+
fi
4047
version=$(grep '^version =' Cargo.toml | head -n 1 | sed 's/.*"\(.*\)"/\1/')
4148
echo "::set-output name=version::$version"
4249

ci/force-ci-bump-version.sh

Lines changed: 0 additions & 16 deletions
This file was deleted.

docs/contributing-release-process.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ Specifically what happens for a major version release is:
1919
* Commit the changes with a special marker in the commit message
2020
* Push these changes to a branch
2121
* Open a PR with this branch against `main`
22-
1. A maintainer of Wasmtime signs off on the PR and merges it.
22+
2. A maintainer of Wasmtime signs off on the PR and merges it.
2323
* Most likely someone will need to push updates to `RELEASES.md` beforehand.
2424
* A maintainer should double-check there are [no open security issues][rustsec-issues].
25-
1. The `.github/workflow/push-tag.yml` workflow is triggered on all commits to
25+
3. The `.github/workflow/push-tag.yml` workflow is triggered on all commits to
2626
`main`, including the one just created with a PR merge. This workflow will:
2727
* Scan the git logs of pushed changes for the special marker added by
2828
`bump-version.yml`.
2929
* If found, tags the current `main` commit and pushes that to the main
3030
repository.
31-
1. Once a tag is created CI runs in full on the tag itself. CI for tags will
31+
4. Once a tag is created CI runs in full on the tag itself. CI for tags will
3232
create a GitHub release with release artifacts and it will also publish
3333
crates to crates.io. This is orchestrated by `.github/workflows/main.yml`.
3434

@@ -49,20 +49,19 @@ time the process for making a patch release of `2.0.1` the process is:
4949
`scripts/publish.rs` do not have semver-API-breaking changes (in the
5050
strictest sense). All security fixes must be done in such a way that the API
5151
doesn't break between the patch version and the original version.
52-
1. Locally check out `release-2.0.1` and make sure you're up-to-date.
53-
1. Run `rustc scripts/publish.rs`
54-
1. Run `./publish bump-patch`
55-
1. Update `RELEASES.md`
56-
1. Commit the changes. Include the marker
57-
`[automatically-tag-and-release-this-commit]` in your commit message.
58-
1. Make a PR against the `release-2.0.1` branch.
59-
1. Merge the PR when CI is green
52+
2. Visit [this patch][bump-version] and manually trigger the `bump-version.yml`
53+
workflow for the `release-2.0.1` branch with the `bump-patch` argument. This
54+
will simulate step (1) of the above release process.
55+
3. Review the generated PR, probably updating `RLEASES.md` as well.
6056
* Note that if historical branches may need updates to source code or CI to
6157
pass itself since the CI likely hasn't been run in a month or so. When in
6258
doubt don't be afraid to pin the Rust version in use to the rustc version
6359
that was stable at the time of the branch's release.
60+
4. Merge the generated PR, and that's the whole patch release.
6461

6562
From this point automated processes should take care of the rest of the steps,
6663
basically resuming from step 3 above for major releases where `push-tag.yml`
6764
will recognize the commit message and push an appropriate tag. This new tag will
6865
then trigger full CI and building of release artifacts.
66+
67+
[bump-version]: https://github.com/bytecodealliance/wasmtime/actions/workflows/bump-version.yml

0 commit comments

Comments
 (0)