There is two ways to release:
- Just bump version in the Cargo.toml, then commit to main branch. See more about this pipeline.
- Push new tag to main branch. See more about this pipeline.
Can be trigged by: Version of the crate don't equal to the latest git-tag for this commit.
Branches where can be triggered:
- main
- master
release-v?[0-9]+\.[0-9]+.*
Note: Everywhare where mention the "main" branch in this document, that means this list of branches.
Steps will happen:
- Determine the version of the crate
- Determin latest git tag for this commit
- Compare. Breake if equal or if cannot push tag because it already exists
- Push new tag to this commit, named as the version (see version conversion)
- Execute main release workflow.
PR Way:
- checkout the main branch
- create new branch for future PR
- bump version in the Cargo.toml
- commit, push, PR
- wait review & merge
When you PR merged to main branch, pipeline will check the version and try to create tag and release. - go to releases
- edit description of the new created by pipeline release (you can save without publication)
- wait all builds
- publish the release.
Do not publish before all builds are done because it can break the pipeline. After publication, url for upload artifacts (builds) can be (will) changed, so later builds can't be attached to this release page.
Hardcore Way:
Same as above but just commit to master/main without PR. So see above and skip steps 2 and 5.
There used GH-action to do all work.
Important options for future twicks:
tag-to-version
version-to-tag
Can be trigged by: New tag pushed to main branch.
Branches where can be triggered:
- main
- master
release-v?[0-9]+\.[0-9]+.*
Tags what can be trigger the pipeline:
v?[0-9]+.[0-9]+\.*
Steps will happen:
- Workflow starts automatically, thanks to GH.
Usage
Same as first workflow above but instead of edit file you should push the tag to main branch, without any forks and PRs.
PR Way:
- checkout the main branch
- push new tag
- go to releases
- same steps about release editing and publication.