Generally, we bump and publish the versions of all crates in this
mono-repository in lockstep.
It does not matter if it's a PATCH, MINOR, MAJOR release.
Reasons for doing it this way:
- Keeps our
RELEASES.mdsimple and easy to grasp.
We can still bundle all changes there together and don't have to go to a more fine-grained crate level. - Easier to follow reported issues.
All crates are closely tied together anyway and if someone reports an issue with e.g.3.1we know what they mean. - Easier to keep the workshop/documentation/playground/user interfaces in sync.
- Easier for users to follow changes.
Those will all be listed in one section of the changelog, bundled together, released at the same time. - Third party tooling like dependabot can easily extract the changelog.
Examples (so anything in the integration-tests/ folder) are a bit of a special case
in our release pipeline since they are considered as ink! internals and not part of
the library per-say.
What this means is that any changes to the examples (breaking or not) should only be
considered a PATCH level change. Additionally, they should not be published to
crates.io.
We'll be using cargo-release to release
ink!. There are still a few manual steps though, and we hope to make this more streamlined
in the future.
- Create a new feature branch off
master. - Copy the release notes that appear in the
CHANGELOG.mdinto the PR description.- This will cause the individual PRs to be linked to the release in which they are included.
- Bump the version in all TOML files to the new version.
find . -type f -name *.toml -exec sed -i -e 's/$OLD_VERSION/$NEW_VERSION/g' {} \; - Make sure you've moved the changes in the
CHANGELOG.mdfrom[Unreleased]into a new section for the release. - Check that all notable PRs since the last release are now in the new release section,
in case the
[Unreleased]section was incomplete.
- Notable changes are changes that affect users in some way. This means that something like a change to our CI pipeline is likely not notable and should not be included.
- Make sure you've merged the latest
masterinto your branch. - Open a release PR
- Wait for approvals from Core team members.
- Ensure the entire CI pipeline is green.
- Before releasing, take note of the release order:
ink_e2eis dependent on thecargo-contractcrates, which are dependent on theink"core" crates.- Therefore, first release all
inkcrates exceptink_e2e. - Release
cargo-contractcrates. - Request update of
drinkclient, which depends on thecargo-contractcrates. - Release
ink_e2e.
- The
ink_runtimecrate depends on a git commit ofpolkadot-sdk, hence it currently cannot be published to crates.io. - Do a dry run:
This command ignores the
fd Cargo.toml crates/ | \ grep -v e2e | \ grep -v runtime/ | \ xargs -n1 cargo no-dev-deps publish --allow-dirty --dry-run --manifest-path
e2eandruntimefolders: Thee2ecrates depend on thecargo-contract/contract-buildcrate, so if you want to publish those, you need to publishcargo-contract/contract-buildfirst. Theruntimeis ignored, as it depends on some crates via theirgitref. It usesno-dev-depsfor publishing, so that thedev-dependenciesof ink! are ignored for publishing. They are not needed and due to a cycle it's also not possible to publish with them. Ignoringdev-dependenciesis also why--allow-dirtyis necessary. - Following a successful dry run, we can now publish to crates.io.
- This will be done from the release branch itself.
- This is because it is possible for the dry run to succeed but for the actual publish
to fail and require some changes. So before running the next step:
- Ensure there have been no new commits to
masterwhich are not included in this branch. - Notify core team members in the Element channel that no PRs should be merged to
masterduring the release. - The above is to ensure that the bundled code pushed to crates.io is the same as the tagged release on GitHub.
- Ensure there have been no new commits to
- Publish with
fd Cargo.toml crates/ | \ grep e2e | \ xargs -n1 cargo no-dev-deps publish --allow-dirty --manifest-path
- Following a successful release from the release PR branch, now the PR can be merged
into
master- Once merged, notify core team members in the Element channel that PRs can be merged
again into
master
- Once merged, notify core team members in the Element channel that PRs can be merged
again into
- Replace
vX.X.Xwith the new version in the following command and then execute it:git tag -s vX.X.X && git push origin vX.X.X- Ensure your tag is signed with an offline GPG key!
- Alternatively, the
Create releaseGitHub UI below allows creating this tag when creating the release.
- Update the
ink-examplesrepository with the content ofintegration-tests(minusmother,lang-err-integration-testsandmapping-integration-tests). Besides copying those folders over, the only change you need to do manually is to switch the dependencies in theCargo.toml's to use the published version of your release. - Create a GitHub release for this tag. In the tag overview
you'll see your new tag appear. Click the
…on the right of the tag and thenCreate release. - Paste the release notes that appear in the
CHANGELOG.mdthere. The title of the release should bevX.X.X. - Post an announcement to the Telegram channel: https://t.me/inkathon/1
- Update the documentation with the new release: