This repository has been archived by the owner on Sep 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
action.yml
62 lines (61 loc) · 2.19 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
name: Version Composer
author: Julian Sangillo
description: Returns a new version identifier
branding:
icon: tag
color: red
inputs:
revision-pattern:
description: Custom pattern showing version structure.
required: false
default: M.m.b
preferred-type:
description: The preferred revision type to fallback to if no other type can be determined. Possible values are 'build' or 'patch'
required: false
default: build
stable-branch:
description: Name of branch in your repo that will be used for stable releases.
required: false
default: master
test-branch:
description: Name of branch in your repo that will be used for test releases.
required: false
default: test
dev-branch:
description: Name of branch in your repo that will be used for development releases.
required: false
default: develop
stable-tag:
description: Custom release tag name for stable releases. By default, stable releases have no stable tag.
required: false
test-tag:
description: Custom release tag name for test releases.
required: false
default: TEST
dev-tag:
description: Custom release tag name for development releases.
required: false
default: UNSTABLE
outputs:
version:
description: The new version with the release tag appended at the end.
value: ${{ steps.versioning.outputs.version }}
raw-version:
description: Version without the release tag at the end.
value: ${{ steps.versioning.outputs.raw_version }}
is-prerelease:
description: True if this version is an unstable release (dev or test branch) or false otherwise.
value: ${{ steps.versioning.outputs.is_prerelease }}
runs:
using: composite
steps:
- run: |
echo "::add-path::$GITHUB_ACTION_PATH/${{ env.SRC }}";
echo "::add-path::$GITHUB_ACTION_PATH/${{ env.SRC_UTILS }}"
env:
SRC: src
SRC_UTILS: src/utils
shell: bash
- id: versioning
run: version-composer "${{ inputs.revision-pattern }}" "${{ inputs.preferred-type }}" "${{ inputs.stable-branch }}" "${{ inputs.test-branch }}" "${{ inputs.dev-branch }}" "${{ inputs.stable-tag }}" "${{ inputs.test-tag }}" "${{ inputs.dev-tag }}"
shell: bash