77 draft_release :
88 name : Create draft release
99 runs-on : ubuntu-latest
10+ permissions :
11+ contents : write
1012 steps :
1113 - name : Get version from tag
1214 id : tag_name
1315 run : echo "RELEASE_VERSION=$(date +'%Y%m%d.%H%M%S')" >> $GITHUB_ENV
1416 - uses : actions/checkout@v2
1517 - name : Create draft release
16- run : gh release create --draft "$tag" --title "$tag" --notes "${{ steps.changelog_reader.outputs.changes }}"
18+ env :
19+ GH_TOKEN : ${{ github.token }}
20+ GH_REPO : ${{ github.repository }}
21+ run : gh release create --draft "${{ env.RELEASE_VERSION }}" --title "${{ env.RELEASE_VERSION }}" --notes "${{ steps.changelog_reader.outputs.changes }}"
1722 - name : Upload universalJavaApplicationStub.sh asset
1823 env :
1924 GH_TOKEN : ${{ github.token }}
2025 GH_REPO : ${{ github.repository }}
21- run :
26+ run : |
2227 cp ./src/universalJavaApplicationStub ./universalJavaApplicationStub.sh
2328 gh release upload ${{ env.RELEASE_VERSION }} ./universalJavaApplicationStub.sh
2429
2530 compile :
2631 name : Compile the stub
2732 needs : draft_release # we need to know the upload URL
2833 runs-on : macos-latest
34+ permissions :
35+ contents : write
2936 steps :
3037 - uses : actions/checkout@v2
3138
@@ -66,11 +73,11 @@ jobs:
6673 env :
6774 GH_TOKEN : ${{ github.token }}
6875 GH_REPO : ${{ github.repository }}
69- run :
76+ run : |
7077 cp build/x86_64/nativeJavaApplicationStub ./nativeJavaApplicationStub.x86_64
7178 cp build/arm64/nativeJavaApplicationStub ./nativeJavaApplicationStub.arm64
7279 cp build/universal/nativeJavaApplicationStub ./nativeJavaApplicationStub
73- gh release upload ${{ needs.draft_release.outputs.tag }} \
80+ gh release upload ${{ env.RELEASE_VERSION }} \
7481 ./universalJavaApplicationStub.x86_64 \
7582 ./universalJavaApplicationStub.arm64 \
7683 ./universalJavaApplicationStub \
8289 name : Publish drafted release
8390 needs : [ draft_release, compile ]
8491 runs-on : ubuntu-latest
92+ permissions :
93+ contents : write
8594 steps :
8695 - name : Publish Release
8796 env :
8897 GH_TOKEN : ${{ github.token }}
8998 GH_REPO : ${{ github.repository }}
90- run : gh release edit ${{ needs.draft_release.outputs.tag }}
99+ run : gh release edit ${{ env.RELEASE_VERSION }}
0 commit comments