1- # This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
2- # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
3-
4- name : Build and Publish
1+ name : Build and Publish
52
63on :
74 push :
@@ -34,13 +31,15 @@ jobs:
3431 with :
3532 java-version : ' 16'
3633 distribution : ' adopt'
37- cache : gradle
38- - run : .\scripts\decodeAndWrite.ps1 -encodedValue $env:ENCODED_VALUE -outputPath $env:OUTPUT_PATH
34+ cache : gradle
35+ - name : Download file
36+ run : .\scripts\decodeAndWrite.ps1 -encodedValue $env:ENCODED_VALUE -outputPath $env:OUTPUT_PATH
3937 shell : pwsh
4038 env :
4139 ENCODED_VALUE : ${{ secrets.LOCAL_PROPERTIES }}
4240 OUTPUT_PATH : ' .\local.properties'
43- - run : .\scripts\decodeAndWrite.ps1 -encodedValue $env:ENCODED_VALUE -outputPath $env:OUTPUT_PATH
41+ - name : Download file
42+ run : .\scripts\decodeAndWrite.ps1 -encodedValue $env:ENCODED_VALUE -outputPath $env:OUTPUT_PATH
4443 shell : pwsh
4544 env :
4645 ENCODED_VALUE : ${{ secrets.SECRING_GPG }}
@@ -64,13 +63,15 @@ jobs:
6463 with :
6564 java-version : ' 16'
6665 distribution : ' adopt'
67- cache : gradle
68- - run : .\scripts\decodeAndWrite.ps1 -encodedValue $env:ENCODED_VALUE -outputPath $env:OUTPUT_PATH
66+ cache : gradle
67+ - name : Download file
68+ run : .\scripts\decodeAndWrite.ps1 -encodedValue $env:ENCODED_VALUE -outputPath $env:OUTPUT_PATH
6969 shell : pwsh
7070 env :
7171 ENCODED_VALUE : ${{ secrets.LOCAL_PROPERTIES }}
72- OUTPUT_PATH : ' .\local.properties'
73- - run : .\scripts\decodeAndWrite.ps1 -encodedValue $env:ENCODED_VALUE -outputPath $env:OUTPUT_PATH
72+ OUTPUT_PATH : ' .\local.properties'
73+ - name : Download file
74+ run : .\scripts\decodeAndWrite.ps1 -encodedValue $env:ENCODED_VALUE -outputPath $env:OUTPUT_PATH
7475 shell : pwsh
7576 env :
7677 ENCODED_VALUE : ${{ secrets.SECRING_GPG }}
@@ -95,24 +96,26 @@ jobs:
9596 **/gradle/**
9697 Scripts/**
9798
98- githubRelease :
99+ create_Tag :
99100 needs : maven_Release
100101 runs-on : ubuntu-latest
102+ env :
103+ RELEASE_TAG : " "
101104 steps :
102105 - uses : actions/checkout@v2
103- - name : Download Build Artifact
104- 105- with :
106- name : drop
107- path : drop
108- - name : Github Release
109- uses :
anton-yurchenko/[email protected] 110- env :
111- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN}}
112- DRAFT_RELEASE : " false"
113- PRE_RELEASE : " false"
114- CHANGELOG_FILE : " CHANGELOG.md"
115- ALLOW_EMPTY_CHANGELOG : " true"
106+ - name : Get Version
107+ id : GetVersion
108+ run : .\scripts\getLatestVersion.ps1
109+ shell : pwsh
110+ - name : Create tag
111+ 112+ with :
113+ tag : ${{ steps.GetVersion.outputs.tag }}
114+ - name : Queue Git Release
115+ uses : benc-uk/workflow-dispatch@v1
116116 with :
117- args : |
118- drop/**
117+ workflow : Git Release
118+ token : ${{ secrets.PERSONAL_TOKEN }}
119+ ref : ${{ steps.GetVersion.outputs.tag }}
120+
121+
0 commit comments