docs/dev/release.md
The release process of wasmer is mostly automated, including generating the CHANGELOG,
tagging the release and starting the build.yaml action
In the /scripts folder, you will see three files:
update-version.py: iterates through all Cargo.toml files and bumps the version number
according to PREVIOUS_VERSION and NEXT_VERSIONpublish.py: resolves the dependency order and publishes all crates to crates.iomake-release.py: creates a new pull request from the current master branch, generates the
CHANGELOG, waits until all checks have passed and the release PR is merged, then starts the
GitHub action to trigger the actual release on GitHub.In theory, all you need to do to create a new release is to look that master is green, then
run python3 scripts/make-release.py 3.2.0 - in practice the script can sometimes lock up or
break due to unexpected delays for example it takes a couple of seconds between a pull request
being merged and master being updated. Therefore it's best to run each step individually and
make sure that every step finishes properly.
# required before starting
gh login
# Script will create a release PR (release-3.2.0) and loop until the
# release PR is merged into master (after checks are green)
python3 scripts/make-release.py 3.2.0
# After the release PR is merged, the build.yml workflow should be
# triggered automatically - if it isn't, trigger it manually
git checkout master
git tag v3.2.0 && git push origin v3.2.0
gh workflow run build.yml --ref v3.2.0 --field release=v3.2.0
# After the release is done on GitHub, run the script again
# to update the release notes
python3 scripts/make-release.py 3.2.0
# Once the release on GitHub is properly done and verified that all
# artifacts exist, checkout the tag and run the publishing to crates.io
git checkout v3.2.0
python3 scripts/publish.py publish
After the GitHub release (first command), the crates need to be published to crates.io - the order is important because if anything goes wrong in the first command or a release needs to be amended because of last-minute fixes, we can still revert the GitHub release, but publishing on crates.io is final because we can't yank crates (this has caused a lot of version-renumbering issues in the past).
There are a couple of problems with the scripts that you should watch out for:
say command), so that you
can leave the script running in the background and get notified if anything goes wrong.build.yml action, in some cases it has to be run manuallySETTINGS in the publish.py script if some crates need default-features
to be enabled when publishingcd lib/crate && cargo publishgithub:wasmerio:wasmer-core.