Make release CI workflow
pacmancoder opened this issue · comments
Vladyslav Nikonov commented
Make CI workflow for releasing new rustzx versions, so new versions could be released more easily. Workflow requirements:
- Create github releases page with change log and artifacts (use CHANGELOG.md and artifacts produced on the previous steps)
- Publish all rustzx crates to crates.io (last step)
- If possible, make draft release for dev branch and promote same release to non-draft when tag is pushed
- Perform dry run of cargo publish in dev branch
- If easy to implement, detect changes in crates and fail if forgot to raise version (check in dev branch)
Checklist
- Check that pending version is bigger than already released
- Check all
publish = true
crates version consistency - Check that
git
available - Check that user specified all required data (GitHub token, crates.io token, artifacts folder)
- Check that artifacts folder is not empty
- check that current commit (git call) exist in remote (via
octocrab
) - check that changelog was updated
- Add version bump functionality
- crates are pushed
- crates pushed in right order (via guppy)
- create tag from commit (via
octocrab
GitHub API) - create github release
- Implement
--dry-run
Vladyslav Nikonov commented
Implementation tips:
- Whole release process can be implemented as rust utility
- XAMPPRocky/octocrab can be used for GitHub interaction (creating GitHub releases)
- While in monorepo, all crate versions should be the same before release - utility should validate this (maybe use facebookincubator/cargo-guppy?)
- Also facebookincubator/cargo-guppy can be used to get cargo publish
- Utility should validate that all tools and tokens are available before start (
git
,cargo
, GH token, crates.io token) - Utility should check that currently running branch is master
- Utility should check that new version is higher than available on crates.io (or crate is absent, that's handy for new crates)
- Utility should validate that CHANGELOG.md contains new section for the new release and use it for Github Releases body (body text should be inside
<!-- START_RELEASE_NOTES|v0.15.0 -->
<!-- END_RELEASE_NOTES -->
- Utility should have
--validate
option, to perform all validation steps on theCI
fordev/vX.Y.Z
branch and master - Utility should query GitHub PRs with current branch name and check that if PR contains
closes #issue
, then changelog should mention it, unlessskip_changelog
is was for it - New manually-triggered GitHub workflow should be added (on master) to perform release remotely
Vladyslav Nikonov commented
Created separate crate for workspace management (including releases). https://github.com/pacmancoder/cargo-monorepo
Vladyslav Nikonov commented
Closing for now, most likely, this process will stay semi-manual, but with help of cargo-monorepo tool