18
18
jobs :
19
19
release :
20
20
runs-on : ubuntu-latest
21
+ outputs :
22
+ taskit_version : ${{ steps.version-string.outputs.taskit_version }}
21
23
permissions :
22
24
contents : write
23
25
steps :
@@ -42,10 +44,12 @@ jobs:
42
44
MAVEN_PASSWORD : ${{ secrets.MAVEN_CENTRAL_TOKEN }}
43
45
MAVEN_GPG_PASSPHRASE : ${{ secrets.GPG_SECRET_KEY_PASSWORD }}
44
46
45
- - name : Get Taskit Version
47
+ - name : Get Version
48
+ id : version-string
46
49
run : |
47
50
echo "version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout --file pom.xml)" >> "$GITHUB_ENV"
48
-
51
+ echo "taskit_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout --file pom.xml)" >> "$GITHUB_OUTPUT"
52
+
49
53
- name : Make Taskit Release
50
54
51
55
with :
54
58
tag : " v${{ env.version }}"
55
59
generateReleaseNotes : true
56
60
skipIfReleaseExists : true
61
+
62
+ update-gcm-taskit :
63
+ needs : release
64
+ runs-on : ubuntu-latest
65
+ permissions :
66
+ contents : write
67
+ env :
68
+ VERSION : ${{ needs.release.outputs.gcm_taskit_version }}
69
+ steps :
70
+ - name : Checkout GCM Taskit
71
+ uses : actions/checkout@v4
72
+ with :
73
+ repository : HHS/ASPR-ms-gcm-taskit
74
+ token : ${{ secrets.GHA_BOT }}
75
+
76
+ - name : Update Taskit version
77
+ run : |
78
+ echo "$VERSION"
79
+ sed -i "0,/<taskit.version>.*<\/taskit.version>/s//<taskit.version>$VERSION<\/taskit.version>/g" pom.xml
80
+
81
+ - name : Increment GCM Taskit Version
82
+ run : |
83
+ current_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout --file pom.xml)
84
+ echo GCM Taskit Version: $current_version
85
+ parts=( ${current_version//./ } )
86
+ bv=$((parts[2] + 1))
87
+ new_version="${parts[0]}.${parts[1]}.${bv}"
88
+ echo New GCM Taskit Version: $new_version
89
+ sed -i "0,/<revision>.*<\/revision>/s//<revision>$new_version<\/revision>/g" pom.xml
90
+
91
+ - name : Setup Git
92
+ run : |
93
+ git config --global user.name "github-actions"
94
+ git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
95
+
96
+ - name : Make branch in GCM Taskit
97
+ run : |
98
+ git checkout -b update-gcm-taskit-to-$VERSION
99
+ git add pom.xml
100
+ git commit -m "Update gcm taskit to $VERSION"
101
+ git push --set-upstream origin update-gcm-taskit-to-$VERSION
102
+
103
+ - name : Make PR in GCM Taskit
104
+ run : |
105
+ gh pr create -R HHS/ASPR-ms-gcm-taskit -B main --fill
106
+ gh pr merge -m --auto
107
+ env :
108
+ GH_TOKEN : ${{ secrets.GHA_BOT }}
0 commit comments