Skip to content

Commit 96aba6a

Browse files
committed
Fix some build script errors
1 parent f8393da commit 96aba6a

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.github/workflows/compile.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,18 @@ jobs:
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 }}
@@ -26,6 +31,8 @@ jobs:
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

@@ -70,7 +77,7 @@ jobs:
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 \
@@ -82,9 +89,11 @@ jobs:
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

Comments
 (0)