Files
version-increment/action.yml

70 lines
2.4 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 }}
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:
2021-10-20 11:18:23 +11:00
current_version: ${{ steps.version-lookup.outputs.current-version }}
increment: ${{ inputs.increment }}
scheme: ${{ inputs.scheme }}