Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#1212] Added support for CalVer scheme when generating release notes. #1382

Merged
merged 1 commit into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/draft-release-notes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,19 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Generate CalVer version
if: env.DREVOPS_RELEASE_VERSION_SCHEME == 'calver'
id: calver
run: |
export VERSION="$(date "+%y.%-m").0"
echo "version=${VERSION}" >> "${GITHUB_OUTPUT}"
echo "Version set to ${VERSION}"

- name: Draft release notes
uses: release-drafter/release-drafter@v6
with:
tag: ${{ steps.calver.outputs.version || github.ref_name }}
name: ${{ steps.calver.outputs.version || github.ref_name }}
version: ${{ steps.calver.outputs.version || github.ref_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17 changes: 16 additions & 1 deletion docs/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Refer to https://docs.drevops.com/latest/usage/release for more information.
6. The hash of the `HEAD` of the `production` branch matches the hash of
the `HEAD` of `master` branch.

## Version Number
## Version Number - Semantic Versioning

Release versions are numbered according to [Semantic Versioning](https://semver.org/).

Expand All @@ -35,3 +35,18 @@ Examples:

* Correct: `0.1.0`, `1.0.0` , `1.0.1` , `1.0.10`
* Incorrect: `0.1` , `1` , `1.0` , `1.0.01` , `1.0.010`

## Version Number - CalVer

Release versions are numbered according to [CalVer Versioning](https://calver.org/).

Given a version number `YY.M.Z`:

* `YY` = Short year. No leading zeroes.
* `M` = Short month. No leading zeroes.
* `Z` = Hotfix/patch version. No leading zeroes.

Examples:

* Correct: `24.1.0`, `24.11.1` , `24.1.10`, `24.0.1`, `9.12.0`
* Incorrect: `24.0.0`, `2024.1.1` , `24` , `24.1.00` , `24.01.0` , `01.1.0`