2021-10-20 11:18:23 +11: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:
|
|
|
|
|
description: 'Versioning scheme - semver, or, calver (defaults to semver)'
|
|
|
|
|
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)
|
|
|
|
|
|
|
|
|
|
Not applicable to `calver` scheme
|
|
|
|
|
required: false
|
|
|
|
|
default: 'patch'
|
|
|
|
|
|
|
|
|
|
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:
|
|
|
|
|
description: 'Current normal version detected, prefixed with a `v` charatcter'
|
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'
|
2022-10-19 09:28:39 +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
|
|
|
|
|
run: ${{ github.action_path }}/version-lookup.sh
|
|
|
|
|
shell: bash
|
2021-10-22 11:49:04 +11:00
|
|
|
env:
|
|
|
|
|
scheme: ${{ inputs.scheme }}
|
2021-10-20 11:18:23 +11:00
|
|
|
|
|
|
|
|
- id: version-increment
|
|
|
|
|
run: ${{ github.action_path }}/version-increment.sh
|
|
|
|
|
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-04-27 08:31:46 +10:00
|
|
|
pep440: ${{ inputs.pep440 }}
|
2021-10-22 11:49:04 +11:00
|
|
|
scheme: ${{ inputs.scheme }}
|