Files
version-increment/action.yml

73 lines
2.6 KiB
YAML
Raw Normal View History

2021-10-20 11:18:23 +11:00
---
name: 'Version Increment'
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'
increment:
description: |
Field to increment - major, minor, or, patch (defaults to patch)
Not applicable to `calver` scheme
required: false
default: 'patch'
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 }}
scheme: ${{ inputs.scheme }}