forked from reecetech/version-increment
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
103 lines (95 loc) · 4.03 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
---
name: 'Version Increment'
description: Inspects the git tags to determine the current normal version, and returns the next version number
branding:
icon: plus
color: purple
inputs:
scheme:
description: |
Versioning scheme - semver, calver or conventional_commits (defaults to semver).
`conventional_commits` Will parse the last commit message (e.g. the merge commit) to
determine the increment type, and supports the following increment types by keyword:
- patch (build, chore, ci, docs, fix, perf, refactor, revert, style, test)
- minor (feat)
- major (any of the above keywords followed by a '!' character, or 'BREAKING CHANGE:' in commit body)
required: false
default: 'semver'
pep440:
description: 'PEP440 compatibility mode - shifts the pre-release version information into build metadata instead'
required: false
default: false
increment:
description: |
Field to increment - major, minor, or, patch (defaults to patch)
If using the `conventional_commits` scheme, this is the default increment if the parsing of the merge commit fails to
find conventional commits information
Not applicable to `calver` scheme
required: false
default: 'patch'
release_branch:
description: 'Specify a non-default branch to use for the release tag (the one without -pre)'
required: false
type: string
use_api:
description: 'Use the GitHub API to discover current tags, which avoids the need for a git checkout, but requires `curl` and `jq`'
disable_pre_release:
description: "Disable pre-release versioning"
required: false
default: false
outputs:
current-version:
description: 'Current normal version detected'
value: ${{ steps.version-lookup.outputs.CURRENT_VERSION }}
current-v-version:
description: 'Current normal version detected, prefixed with a `v` character'
value: ${{ steps.version-lookup.outputs.CURRENT_V_VERSION }}
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 }}
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 }}
runs:
using: "composite"
steps:
- id: version-lookup
run: "${GITHUB_ACTION_PATH}/version-lookup.sh"
shell: bash
env:
github_token: ${{ github.token }}
scheme: ${{ inputs.scheme }}
use_api: ${{ inputs.use_api }}
- id: version-increment
run: "${GITHUB_ACTION_PATH}/version-increment.sh"
shell: bash
env:
current_version: ${{ steps.version-lookup.outputs.CURRENT_VERSION }}
increment: ${{ inputs.increment }}
github_token: ${{ github.token }}
pep440: ${{ inputs.pep440 }}
scheme: ${{ inputs.scheme }}
release_branch: ${{ inputs.release_branch }}
use_api: ${{ inputs.use_api }}
disable_pre_release: ${{ inputs.disable_pre_release }}