-
Notifications
You must be signed in to change notification settings - Fork 5
/
action.yml
57 lines (54 loc) · 1.96 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
description: Update pom files to the next pre-release
name: Update pom to next pre-release
inputs:
prerelease-type:
description: The type of the prerelease, i.e. `alpha`, `beta`, `rc`
required: false
default: alpha
maven-cli-opts:
description: extra maven properties
required: false
property-to-update:
description: property to update in addition to the version of the pom file
required: false
version:
description: custom version to be set
required: false
outputs:
next-prerelease:
description: "Next prerelease"
value: ${{ steps.resolve-version.outputs.version }}
runs:
using: composite
steps:
- name: Parse next version from POM
id: parse-next-final-version
if: inputs.version == ''
shell: bash
run: |
NEXT_VERSION=$(yq -p=xml e '.project.version' pom.xml | grep -o "[0-9]*\.[0-9]*.[0-9]*")
echo "Next final version: $NEXT_VERSION"
echo "result=$NEXT_VERSION" >> $GITHUB_OUTPUT
- id: next-prerelease-resolver
name: Calculate next internal release
if: inputs.version == ''
uses: Alfresco/alfresco-build-tools/.github/actions/calculate-next-internal-version@v8.4.0
with:
next-version: ${{ steps.parse-next-final-version.outputs.result }}
prerelease-type: ${{ inputs.prerelease-type }}
- id: resolve-version
name: Resolve version
shell: bash
run: |
if [ ${{ inputs.version }} != '' ]
then
echo "version=${{ inputs.version }}" >> $GITHUB_OUTPUT
else
echo "version=${{ steps.next-prerelease-resolver.outputs.next-prerelease }}" >> $GITHUB_OUTPUT
fi
- name: Update pom files to the new version
uses: Alfresco/alfresco-build-tools/.github/actions/maven-update-pom-version@v8.4.0
with:
version: ${{ steps.resolve-version.outputs.version }}
maven-cli-opts: ${{ inputs.maven-cli-opts }}
property-to-update: ${{ inputs.property-to-update }}