chore(tools): centralize all versions related utils in a single script

- update version to be semver compliant with the new tools
- update make targets and CI workflow to use the new version tool
- update release issue template
This commit is contained in:
Arthur Meyre
2021-10-04 14:41:37 +02:00
parent e451afc283
commit b363db6700
10 changed files with 284 additions and 135 deletions

View File

@@ -1,7 +1,7 @@
---
name: Release
about: Issue template to prepare a release step by step.
title: "Release vX.Y.Z (or vX.Y.Zrc?)"
title: "Release vX.Y.Z (or vX.Y.Z-rc?)"
---
<!-- Make sure to set the proper version in the issue template -->
Please check all steps if it was either done/already done, at the end of a release all check boxes must have been checked.
@@ -9,20 +9,20 @@ Please check all steps if it was either done/already done, at the end of a relea
Release check-list:
<!-- Note that some of these steps will be automated in the future -->
If it was not already done:
- [ ] Choose the version number, e.g. `vX.Y.Z` (can be `vX.Y.Zrc?` for Release Candidates) following semantic versioning: https://semver.org/
- [ ] Update the project version to `X.Y.Z` (or `X.Y.Zrc?`) by running:
- [ ] Choose the version number, e.g. `vX.Y.Z` (can be `vX.Y.Z-rc?` for Release Candidates) following semantic versioning: https://semver.org/
- [ ] Update the project version to `X.Y.Z` (or `X.Y.Z-rc?`) by running:
```bash
VERSION=X.Y.Z make set_version
# or
VERSION=X.Y.Zrc? make set_version
VERSION=X.Y.Z-rc? make set_version
```
Then:
- [ ] For non RC releases: check the release milestone issues, cut out what can't be completed in time and change the milestones for these issues
- [ ] Checkout the commit for release, create a signed tag (requires GPG keys setup, see [here](https://docs.github.com/en/github/authenticating-to-github/managing-commit-signature-verification)) with the version name (careful for RC) `git tag -s -a -m "vX.Y.Z release" vX.Y.Z`, (or `vX.Y.Zrc?`) push it to GitHub with `git push origin refs/tags/vX.Y.Z` (or `vX.Y.Zrc?`)
- [ ] Checkout the commit for release, create a signed tag (requires GPG keys setup, see [here](https://docs.github.com/en/github/authenticating-to-github/managing-commit-signature-verification)) with the version name (careful for RC) `git tag -s -a -m "vX.Y.Z release" vX.Y.Z`, (or `vX.Y.Z-rc?`) push it to GitHub with `git push origin refs/tags/vX.Y.Z` (or `vX.Y.Z-rc?`)
- [ ] Wait for the release workflow to finish and get the image url from the notification or the logs
- [ ] See [here](https://docs.github.com/en/github/administering-a-repository/releasing-projects-on-github/managing-releases-in-a-repository#creating-a-release) to create the release in GitHub using the existing tag, add the pull link copied from the step before \(`ghcr.io/zama-ai/concretefhe:vX.Y.Z`\) (or `vX.Y.Zrc?`) for the uploaded docker image. Mark release as pre-release for an `rc` version. See template below:
- [ ] See [here](https://docs.github.com/en/github/administering-a-repository/releasing-projects-on-github/managing-releases-in-a-repository#creating-a-release) to create the release in GitHub using the existing tag, add the pull link copied from the step before \(`ghcr.io/zama-ai/concretefhe:vX.Y.Z`\) (or `vX.Y.Z-rc?`) for the uploaded docker image. Mark release as pre-release for an `rc` version. See template below:
This is the release markdown template you should copy and update:
```
@@ -31,13 +31,13 @@ This is the release markdown template you should copy and update:
```
To continue the release cycle:
- [ ] Choose the version number for next release, e.g. `vA.B.C` (can be `vA.B.Crc?` for Release Candidates) following semantic versioning: https://semver.org/
- [ ] Update the project version to `A.B.C` (or `A.B.Crc?`) by running:
- [ ] Choose the version number for next release, e.g. `vA.B.C` (can be `vA.B.C-rc?` for Release Candidates) following semantic versioning: https://semver.org/
- [ ] Update the project version to `A.B.C` (or `A.B.C-rc?`) by running:
```bash
VERSION=A.B.C make set_version
# or
VERSION=A.B.Crc? make set_version
VERSION=A.B.C-rc? make set_version
```
All done!

View File

@@ -460,7 +460,8 @@ jobs:
# We want the space separated list of versions to be expanded
# shellcheck disable=SC2086
REQUIRES_LATEST_TAG=$(python script/actions_utils/version_comparison.py \
REQUIRES_LATEST_TAG=$(python script/make_utils/version_utils.py \
islatest \
--new-version "${GIT_TAG}" \
--existing-versions $EXISTING_TAGS)