Skip to content

Commit

Permalink
[#1212] Added support for CalVer scheme when generating release not…
Browse files Browse the repository at this point in the history
…es. (#1382)
  • Loading branch information
AlexSkrypnyk authored Aug 28, 2024
1 parent 5b4a5be commit 05161d7
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
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`

1 comment on commit 05161d7

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.