2021-10-20 11:18:23 +11:00
|
|
|
---
|
2023-08-30 11:48:14 +01:00
|
|
|
name: 'Version Increment'
|
2021-10-20 11:31:17 +11:00
|
|
|
description: Inspects the git tags to determine the current normal version, and returns the next version number
|
2021-10-20 11:18:23 +11:00
|
|
|
|
2021-10-20 11:31:17 +11:00
|
|
|
branding:
|
|
|
|
|
icon: plus
|
|
|
|
|
color: purple
|
2021-10-20 11:18:23 +11:00
|
|
|
|
|
|
|
|
inputs:
|
|
|
|
|
scheme:
|
2024-03-20 15:41:06 +11:00
|
|
|
description: |
|
|
|
|
|
Versioning scheme - semver, calver or conventional_commits (defaults to semver).
|
|
|
|
|
|
2024-04-23 17:13:22 +10:00
|
|
|
`conventional_commits` Will parse the last commit message (e.g. the merge commit) to
|
|
|
|
|
determine the increment type, and supports the following increment types by keyword:
|
2024-03-20 15:41:06 +11:00
|
|
|
- patch (build, chore, ci, docs, fix, perf, refactor, revert, style, test)
|
|
|
|
|
- minor (feat)
|
2024-04-23 17:13:22 +10:00
|
|
|
- major (any of the above keywords followed by a '!' character, or 'BREAKING CHANGE:' in commit body)
|
2021-10-20 11:18:23 +11:00
|
|
|
required: false
|
|
|
|
|
default: 'semver'
|
2023-04-27 08:31:46 +10:00
|
|
|
pep440:
|
|
|
|
|
description: 'PEP440 compatibility mode - shifts the pre-release version information into build metadata instead'
|
|
|
|
|
required: false
|
|
|
|
|
default: false
|
2021-10-20 11:18:23 +11:00
|
|
|
increment:
|
|
|
|
|
description: |
|
|
|
|
|
Field to increment - major, minor, or, patch (defaults to patch)
|
|
|
|
|
|
2024-04-23 17:13:22 +10:00
|
|
|
If using the `conventional_commits` scheme, this is the default increment if the parsing of the merge commit fails to
|
|
|
|
|
find conventional commits information
|
|
|
|
|
|
2021-10-20 11:18:23 +11:00
|
|
|
Not applicable to `calver` scheme
|
|
|
|
|
required: false
|
|
|
|
|
default: 'patch'
|
2023-08-25 16:46:55 +01:00
|
|
|
release_branch:
|
2023-09-16 10:06:06 +10:00
|
|
|
description: 'Specify a non-default branch to use for the release tag (the one without -pre)'
|
2023-09-05 10:15:26 +01:00
|
|
|
required: false
|
2023-08-25 16:46:55 +01:00
|
|
|
type: string
|
2023-10-18 23:44:09 +11:00
|
|
|
use_api:
|
|
|
|
|
description: 'Use the GitHub API to discover current tags, which avoids the need for a git checkout, but requires `curl` and `jq`'
|
|
|
|
|
required: false
|
|
|
|
|
default: false
|
2021-10-20 11:18:23 +11:00
|
|
|
|
|
|
|
|
outputs:
|
2022-02-08 14:40:16 +11:00
|
|
|
current-version:
|
2021-10-20 11:18:23 +11:00
|
|
|
description: 'Current normal version detected'
|
2022-10-19 09:28:39 +11:00
|
|
|
value: ${{ steps.version-lookup.outputs.CURRENT_VERSION }}
|
2022-02-08 14:40:16 +11:00
|
|
|
current-v-version:
|
2024-03-20 15:41:06 +11:00
|
|
|
description: 'Current normal version detected, prefixed with a `v` character'
|
2022-10-19 09:28:39 +11:00
|
|
|
value: ${{ steps.version-lookup.outputs.CURRENT_V_VERSION }}
|
2021-10-20 11:18:23 +11:00
|
|
|
version:
|
|
|
|
|
description: 'Incremented version calculated'
|
2022-10-19 09:28:39 +11:00
|
|
|
value: ${{ steps.version-increment.outputs.VERSION }}
|
2022-02-08 14:40:16 +11:00
|
|
|
v-version:
|
|
|
|
|
description: 'Incremented version calculated, prefixed with a `v` charatcter'
|
2024-03-20 15:41:06 +11:00
|
|
|
value: ${{ steps.version-increment.outputs.V_VERSION }}
|
2022-02-10 16:56:32 +11:00
|
|
|
major-version:
|
|
|
|
|
description: 'Major number of the incremented version'
|
2022-10-19 09:28:39 +11:00
|
|
|
value: ${{ steps.version-increment.outputs.MAJOR_VERSION }}
|
2022-02-10 16:56:32 +11:00
|
|
|
minor-version:
|
|
|
|
|
description: 'Minor number of the incremented version'
|
2022-10-19 09:28:39 +11:00
|
|
|
value: ${{ steps.version-increment.outputs.MINOR_VERSION }}
|
2022-02-10 16:56:32 +11:00
|
|
|
patch-version:
|
|
|
|
|
description: 'Patch number of the incremented version'
|
2022-10-19 09:28:39 +11:00
|
|
|
value: ${{ steps.version-increment.outputs.PATCH_VERSION }}
|
2023-03-10 12:40:51 +11:00
|
|
|
pre-release-label:
|
2022-05-12 15:44:33 +10:00
|
|
|
description: 'Pre-release label of the incremented version'
|
2022-10-19 09:28:39 +11:00
|
|
|
value: ${{ steps.version-increment.outputs.PRE_RELEASE_LABEL }}
|
2022-02-10 22:27:59 +11:00
|
|
|
major-v-version:
|
|
|
|
|
description: 'Major number of the incremented version, prefixed with a `v` charatcter'
|
2022-10-19 09:28:39 +11:00
|
|
|
value: ${{ steps.version-increment.outputs.MAJOR_V_VERSION }}
|
2022-02-10 22:27:59 +11:00
|
|
|
minor-v-version:
|
|
|
|
|
description: 'Minor number of the incremented version, prefixed with a `v` charatcter'
|
2022-10-19 09:28:39 +11:00
|
|
|
value: ${{ steps.version-increment.outputs.MINOR_V_VERSION }}
|
2022-02-10 22:27:59 +11:00
|
|
|
patch-v-version:
|
|
|
|
|
description: 'Patch number of the incremented version, prefixed with a `v` charatcter'
|
2022-10-19 09:28:39 +11:00
|
|
|
value: ${{ steps.version-increment.outputs.PATCH_V_VERSION }}
|
2021-10-20 11:18:23 +11:00
|
|
|
|
|
|
|
|
runs:
|
|
|
|
|
using: "composite"
|
|
|
|
|
steps:
|
|
|
|
|
- id: version-lookup
|
2024-04-24 12:28:33 +10:00
|
|
|
run: "${GITHUB_ACTION_PATH}/version-lookup.sh"
|
2021-10-20 11:18:23 +11:00
|
|
|
shell: bash
|
2021-10-22 11:49:04 +11:00
|
|
|
env:
|
2023-10-18 23:44:09 +11:00
|
|
|
github_token: ${{ github.token }}
|
2021-10-22 11:49:04 +11:00
|
|
|
scheme: ${{ inputs.scheme }}
|
2023-10-18 23:44:09 +11:00
|
|
|
use_api: ${{ inputs.use_api }}
|
2021-10-20 11:18:23 +11:00
|
|
|
|
|
|
|
|
- id: version-increment
|
2024-04-24 12:28:33 +10:00
|
|
|
run: "${GITHUB_ACTION_PATH}/version-increment.sh"
|
2021-10-20 11:18:23 +11:00
|
|
|
shell: bash
|
2021-10-20 12:11:22 +11:00
|
|
|
env:
|
2022-10-19 09:28:39 +11:00
|
|
|
current_version: ${{ steps.version-lookup.outputs.CURRENT_VERSION }}
|
2021-10-22 11:49:04 +11:00
|
|
|
increment: ${{ inputs.increment }}
|
2023-10-18 23:44:09 +11:00
|
|
|
github_token: ${{ github.token }}
|
2023-04-27 08:31:46 +10:00
|
|
|
pep440: ${{ inputs.pep440 }}
|
2021-10-22 11:49:04 +11:00
|
|
|
scheme: ${{ inputs.scheme }}
|
2023-08-25 16:46:55 +01:00
|
|
|
release_branch: ${{ inputs.release_branch }}
|
2023-10-18 23:44:09 +11:00
|
|
|
use_api: ${{ inputs.use_api }}
|