22name : Latest Tag
33
44on :
5- push :
6- tags :
7- - v*
8- paths-ignore :
9- - ' README.md'
10- - LICENSE
115 workflow_dispatch :
126
137jobs :
1913 cf_project : ${{steps.cf_project.outputs.value }}
2014 mod_version : ${{steps.mod_version.outputs.value }}
2115 mod_id : ${{steps.mod_id.outputs.value }}
16+ version : ${{steps.version.outputs.version }}
17+
2218 steps :
2319 - name : Checkout
2420 uses : actions/checkout@v2
5147 path : ' ./gradle.properties'
5248 property : ' mod_id'
5349
50+ - name : Semver Version
51+ id : version
52+ run : |
53+ version=$(echo "${{steps.current.outputs.tag}}" | cut -dv -f2)
54+ echo "::set-output name=version::$version"
55+
5456 changelog :
5557 name : Generate Changelog (tags)
5658 runs-on : ubuntu-20.04
@@ -136,6 +138,8 @@ jobs:
136138 run : ./gradlew build -x test
137139 env :
138140 CM_RELEASE : true
141+ CM_SEMVER_VERSION : ${{ needs.vars.outputs.version }}
142+ CM_BUILD_NUM : " 0"
139143 GITHUB_ACTOR : ${{ secrets.GITHUB_ACTOR }}
140144 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
141145
@@ -159,7 +163,7 @@ jobs:
159163 path : changelog
160164 - run : cat changelog/CHANGELOG.md
161165
162- release :
166+ release-github :
163167 name : Make Releases
164168 runs-on : ubuntu-20.04
165169 needs : [changelog, vars, jar]
@@ -191,6 +195,25 @@ jobs:
191195 build-out/${{ needs.vars.outputs.mod_id }}-${{ needs.vars.outputs.mod_version }}.jar
192196 build-out/${{ needs.vars.outputs.mod_id }}-${{ needs.vars.outputs.mod_version }}-api.jar
193197
198+ release-cf :
199+ name : Make Releases
200+ runs-on : ubuntu-20.04
201+ needs : [changelog, vars, jar]
202+ steps :
203+ - name : Download Build Results
204+ uses : actions/download-artifact@v2
205+ with :
206+ name : libs
207+ path : build-out
208+ - name : Download Changelog Results
209+ uses : actions/download-artifact@v2
210+ with :
211+ name : out
212+ path : changelog
213+
214+ - name : Load Changelog File
215+ id : changelog
216+ run : echo ::set-output name=changelog::$(cat changelog/CHANGELOG.md)
194217 - name : Full File
195218 id : filename
196219 run : echo "::set-output name=fullpath::build-out/${{ needs.vars.outputs.mod_id }}-${{ needs.vars.outputs.mod_version }}.jar"
@@ -204,10 +227,10 @@ jobs:
204227 file_path : ${{ steps.filename.outputs.fullpath }}
205228 changelog : ${{ steps.changelog.outputs.changelog }}
206229 changelog_type : markdown
207- game_versions : java:Java 8 ,Forge
230+ game_versions : java:Java 17 ,Forge
208231 release_type : ${{ needs.vars.outputs.release_type }}
209232
210- publishMaven :
233+ release-gh-packages :
211234 name : Maven Release (GH Packages)
212235 runs-on : ubuntu-20.04
213236 needs : [changelog, vars, jar]
@@ -243,5 +266,7 @@ jobs:
243266 run : ./gradlew publishMavenPublicationToGitHubPackagesRepository -x test
244267 env :
245268 CM_RELEASE : " true"
269+ CM_SEMVER_VERSION : ${{ needs.vars.outputs.version }}
270+ CM_BUILD_NUM : " 0"
246271 GITHUB_ACTOR : ${{ secrets.GITHUB_ACTOR }}
247272 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments