Files
version-increment/action.yml

83 lines
3.0 KiB
YAML
Raw Normal View History

2021-10-20 11:18:23 +11:00
---
2023-08-30 11:17:54 +01:00
name: 'Version Increment (Octo)'
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
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'
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'
2023-08-25 16:46:55 +01:00
release_branch:
description: "Specify a non-main branch to use for the release tag (the one without -prerelease). If empty, will use the default branch for the repo."
required:
type: string
2021-10-20 11:18:23 +11:00
outputs:
current-version:
2021-10-20 11:18:23 +11:00
description: 'Current normal version detected'
value: ${{ steps.version-lookup.outputs.CURRENT_VERSION }}
current-v-version:
description: 'Current normal version detected, prefixed with a `v` charatcter'
value: ${{ steps.version-lookup.outputs.CURRENT_V_VERSION }}
2021-10-20 11:18:23 +11:00
version:
description: 'Incremented version calculated'
value: ${{ steps.version-increment.outputs.VERSION }}
v-version:
description: 'Incremented version calculated, prefixed with a `v` charatcter'
value: ${{ steps.version-increment.outputs.V_VERSION }}
major-version:
description: 'Major number of the incremented version'
value: ${{ steps.version-increment.outputs.MAJOR_VERSION }}
minor-version:
description: 'Minor number of the incremented version'
value: ${{ steps.version-increment.outputs.MINOR_VERSION }}
patch-version:
description: 'Patch number of the incremented version'
value: ${{ steps.version-increment.outputs.PATCH_VERSION }}
2023-03-10 12:40:51 +11:00
pre-release-label:
description: 'Pre-release label of the incremented version'
value: ${{ steps.version-increment.outputs.PRE_RELEASE_LABEL }}
major-v-version:
description: 'Major number of the incremented version, prefixed with a `v` charatcter'
value: ${{ steps.version-increment.outputs.MAJOR_V_VERSION }}
minor-v-version:
description: 'Minor number of the incremented version, prefixed with a `v` charatcter'
value: ${{ steps.version-increment.outputs.MINOR_V_VERSION }}
patch-v-version:
description: 'Patch number of the incremented version, prefixed with a `v` charatcter'
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
env:
scheme: ${{ inputs.scheme }}
2021-10-20 11:18:23 +11:00
- id: version-increment
run: ${{ github.action_path }}/version-increment.sh
shell: bash
env:
current_version: ${{ steps.version-lookup.outputs.CURRENT_VERSION }}
increment: ${{ inputs.increment }}
pep440: ${{ inputs.pep440 }}
scheme: ${{ inputs.scheme }}
2023-08-25 16:46:55 +01:00
release_branch: ${{ inputs.release_branch }}