1818
1919 prepare-release :
2020 needs : extract-version
21-
22- name : " tagged release"
2321 runs-on : ubuntu-latest
2422
25- outputs :
26- updated-sha : ${{ steps.get-latest-sha.outputs.updated-sha }}
27-
2823 steps :
29- - name : " display tag name"
30- run : |
31- echo "found tag name ${{ needs.extract-version.outputs.clean_version }}"
32-
3324 - name : checkout sources
3425 uses : actions/checkout@v4
3526
@@ -39,50 +30,11 @@ jobs:
3930 java-version : ' 21'
4031 distribution : ' temurin'
4132
42- - name : " update version to tag"
43- run : |
44- mvn versions:set -DnewVersion=${{ needs.extract-version.outputs.clean_version }} -DprocessAllModules
45- mvn versions:update-properties -DincludeProperties=ssh-signer-common-lib.version
46- mvn versions:commit
47-
48- - name : commit new version
49- id : get-latest-sha
50- run : |
51- git config --global user.email "github-actions[bot]@users.noreply.github.com"
52- git config --global user.name "GitHub Actions"
53-
54- # create a temporary branch from the tag
55- git switch -c temp-from-tag
56-
57- git add .
58- git commit -m "Update version to ${{ needs.extract-version.outputs.clean_version }}"
59-
60- # force move the tag to the new commit
61- git tag -f ${{ github.ref_name }}
62- git push origin ${{ github.ref_name }} --force
63-
64- # merge to main
65- git fetch origin
66- git switch main
67- git merge temp-from-tag --no-ff -m "Merge tag ${{ github.ref_name }} changes into main"
68-
69- git push origin main
70-
71- # cleanup temp branch
72- git branch -d temp-from-tag
73-
74- NEW_SHA=$(git rev-parse main)
75- echo "updated-sha=$NEW_SHA" >> $GITHUB_OUTPUT
76-
77- - name : debug the SHA
78- run : |
79- echo "The SHA exported is: ${{ steps.get-latest-sha.outputs.updated-sha }}"
80-
8133 docker-build :
8234 needs : prepare-release
8335 uses : ./.github/workflows/ssh-key-signer-server-docker.yml
8436 with :
85- sha : ${{ needs.prepare-release.outputs.updated- sha }}
37+ sha : ${{ github. sha }}
8638 secrets : inherit
8739
8840 go-build :
9143 with :
9244 service : go-ssh-keysign
9345 artifactVersion : ${{ needs.extract-version.outputs.clean_version }}
94- sha : ${{ needs.prepare-release.outputs.updated- sha }}
46+ sha : ${{ github. sha }}
9547
9648 create-release :
9749 needs : [docker-build, go-build]
10254 id : create_release
10355 uses : actions/create-release@v1
10456 with :
105- tag_name : ${{ github.ref }} # The tag that triggered the release
57+ tag_name : ${{ github.ref }}
10658 release_name : Release ${{ github.ref }}
10759 draft : true
10860 prerelease : true
0 commit comments