88 - main
99 types :
1010 - closed
11+ paths :
12+ - ' core-java/**'
1113
1214env :
1315 GITHUB_AUTH : ${{ secrets.PUSH_TOKEN }}
2426
2527 outputs :
2628 new-version : ${{ steps.version.outputs.version }}
29+ old-version : ${{ steps.old_version.outputs.previous_version }}
2730
2831 steps :
2932 - name : Check out Git repository
@@ -63,10 +66,10 @@ jobs:
6366 - name : Upload updated version related files to artifacts
6467 uses : actions/upload-artifact@v3
6568 with :
66- name : target
69+ name : version-files
6770 path : |
68- ${{ github.workspace }}/lerna.json
6971 ${{ github.workspace }}/CHANGELOG.md
72+ ${{ github.workspace }}/lerna.json
7073 ${{ github.workspace }}/website/package.json
7174
7275 release-snapshot :
8992 path : ~/.m2/repository
9093 key : ${{ runner.os }}-maven-${{ github.sha }}
9194
92- - name : Download artifacts data
93- uses : actions/download-artifact@v3
94- with :
95- name : target
96-
9795 - name : Maven command to update snapshot version
9896 run : mvn build-helper:parse-version versions:set -f core-java/pom.xml -DnewVersion=${{ needs.prepare-release.outputs.new-version }}-SNAPSHOT versions:commit
9997
100- - name : Build the artifacts
101- run : mvn clean install -f core-java/pom.xml -DskipTests -Dcheckstyle.skip
102-
10398 - name : Release snapshot to Maven central
10499 uses : samuelmeuli/action-maven-publish@v1
105100 with :
@@ -111,17 +106,6 @@ jobs:
111106 server_id : ossrh
112107 maven_args : --settings ${{ github.workspace }}/core-java/setting/settings.xml -f core-java/pom.xml -DskipTests -Dcheckstyle.skip -B
113108
114- - name : Upload target folder
115- uses : actions/upload-artifact@v3
116- with :
117- name : target
118- path : |
119- ${{ github.workspace }}/lerna.json
120- ${{ github.workspace }}/CHANGELOG.md
121- ${{ github.workspace }}/website/package.json
122- ${{ github.workspace }}/core-java/target
123- ${{ github.workspace }}/core-java/pom.xml
124-
125109 release :
126110 runs-on : ubuntu-latest
127111 needs :
@@ -144,17 +128,9 @@ jobs:
144128 path : ~/.m2/repository
145129 key : ${{ runner.os }}-maven-${{ github.sha }}
146130
147- - name : Download artifacts data
148- uses : actions/download-artifact@v3
149- with :
150- name : target
151-
152131 - name : Maven command to update release version
153132 run : mvn build-helper:parse-version versions:set -f core-java/pom.xml -DnewVersion=${{ needs.prepare-release.outputs.new-version }} versions:commit
154133
155- - name : Build the artifacts
156- run : mvn clean install -f core-java/pom.xml -DskipTests -Dcheckstyle.skip
157-
158134 - name : Release to Maven central
159135 uses : samuelmeuli/action-maven-publish@v1
160136 with :
@@ -171,10 +147,13 @@ jobs:
171147 with :
172148 name : target
173149 path : |
174- ${{ github.workspace }}/lerna.json
175- ${{ github.workspace }}/CHANGELOG.md
176- ${{ github.workspace }}/website/package.json
177150 ${{ github.workspace }}/core-java/target
151+
152+ - name : Upload version files folder
153+ uses : actions/upload-artifact@v3
154+ with :
155+ name : version-files
156+ path : |
178157 ${{ github.workspace }}/core-java/pom.xml
179158
180159 push-pom :
@@ -189,10 +168,21 @@ jobs:
189168 with :
190169 token : ${{ env.PUSH_TOKEN }}
191170
192- - name : Download target folder
171+ - name : Download Version files
193172 uses : actions/download-artifact@v3
194173 with :
195- name : target
174+ name : version-files
175+
176+ - name : Update new version
177+ uses : jacobtomlinson/gha-find-replace@v2
178+ with :
179+ find : ${{ needs.prepare-release.outputs.old-version }}
180+ replace : ${{ needs.prepare-release.outputs.new-version }}
181+ regex : false
182+ include : |
183+ README.md
184+ package.json
185+ website/docs/framework-docs/getting-started/usage.md
196186
197187 - name : Import GPG key
198188 uses : crazy-max/ghaction-import-gpg@v5
@@ -210,6 +200,9 @@ jobs:
210200 lerna.json
211201 CHANGELOG.md
212202 website/package.json
203+ README.md
204+ package.json
205+ website/docs/framework-docs/getting-started/usage.md
213206 message : |
214207 chore(Internal): :bookmark: released latest version to maven central
215208 push : true
0 commit comments