-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
53 lines (45 loc) · 1.34 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: 'version-bump'
description: 'bump the semver version'
inputs:
version_tag:
description: 'version tag to use'
required: false
default: "latest"
type: string
bump:
description: 'bump setting'
required: false
default: "patch"
type: string
git_log_from:
description: 'where in the git history to look for bump commits'
required: false
default: "second_merge"
type: string
outputs:
version_last:
description: "last version in the git log"
value: ${{ steps.version.outputs.version_last }}
version_last_numeric:
description: "last version in the git log with only numeric or ."
value: ${{ steps.version.outputs.version_last_numeric }}
version_tag:
description: "version tag"
value: ${{ steps.version.outputs.version_tag }}
version_tag_numeric:
description: "version tag with only numeric or ."
value: ${{ steps.version.outputs.version_tag_numeric }}
runs:
using: "composite"
steps:
# adjust the path so scripts in this repo can be run
- run: echo "${{ github.action_path }}" >> $GITHUB_PATH
shell: bash
- id: version
run: version-bump.sh
shell: bash
# handle when empty input is provided
env:
GHA_TAG: ${{ inputs.version_tag }}
GHA_BUMP: ${{ inputs.bump }}
GHA_GIT_LOG_FROM: ${{ inputs.git_log_from }}