13
13
description : Set to true to prevent maven deploy plugin to actually deploy the artifacts.
14
14
required : true
15
15
default : false
16
+ type : boolean
16
17
17
18
concurrency : rel-${{ github.ref }}
18
19
@@ -22,45 +23,45 @@ defaults:
22
23
23
24
jobs :
24
25
25
- show-inputs :
26
+ repo-prep :
27
+ name : Prepare repository
26
28
runs-on : ubuntu-latest
27
29
steps :
28
- - run : |
30
+ - name : Show-inputs
31
+ run : |
29
32
echo "Version: ${{ inputs.version }} " >> $GITHUB_STEP_SUMMARY
30
33
echo "Release branch: ${{ inputs.branch }} " >> $GITHUB_STEP_SUMMARY
31
34
echo "Workflow branch: ${{ github.ref_name }} " >> $GITHUB_STEP_SUMMARY
32
35
echo "Deploy skip: ${{ inputs.deploy-skip }} " >> $GITHUB_STEP_SUMMARY
33
- - name : Checkout repository
36
+ - name : Checkout
34
37
uses : actions/checkout@v4
35
38
with :
36
39
ref : ${{ inputs.branch }}
37
-
38
- env :
39
- uses : ./.github/workflows/x-env.yml
40
-
41
- create-tags :
42
- name : Create tags
43
- needs : [env]
44
- uses : ./.github/workflows/x-create-tags.yml
45
- with :
46
- tag : ${{ github.event.inputs.version }}
47
- branch : ${{ github.event.inputs.branch }}
48
- set-versions : true
49
- secrets :
50
- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
40
+ - name : Maven environment setup
41
+ run : |
42
+ cat $GITHUB_WORKSPACE/.github/env/release-env | sed -r '/^\s*$/d' >> $GITHUB_ENV
43
+ - name : Create version change commit
44
+ run : |
45
+ ./set-version.sh ${{ inputs.version }}
46
+ git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
47
+ git config --global user.name "github-actions[bot]"
48
+ git commit -a -m "Set version to ${{ inputs.version }}"
49
+ - name : Create tag commit
50
+ run : git tag --force ${{ inputs.version }}
51
+ - name : Push tag with version changes
52
+ run : git push --force origin refs/tags/${{ inputs.version }}
51
53
52
54
keycloak-client :
53
55
name : Keycloak Client
54
- needs : [env, create-tags]
56
+ if : ${{ !inputs.deploy-skip }}
57
+ needs : repo-prep
55
58
uses : ./.github/workflows/x-keycloak-client.yml
56
59
with :
57
60
mvn-url : ${{ needs.env.outputs.mvn-releases-url }}
58
- tag : ${{ github.event. inputs.version }}
59
- deploy-skip : ${{ needs.env.outputs .deploy-skip }}
61
+ tag : ${{ inputs.version }}
62
+ deploy-skip : ${{ inputs .deploy-skip }}
60
63
secrets :
61
- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
62
64
MVN_USERNAME : ${{ secrets.MVN_USERNAME }}
63
65
MVN_TOKEN : ${{ secrets.MVN_TOKEN }}
64
66
GPG_PASSPHRASE : ${{ secrets.GPG_PASSPHRASE }}
65
67
GPG_PRIVATE_KEY : ${{ secrets.GPG_PRIVATE_KEY }}
66
-
0 commit comments