1010jobs :
1111 build-mac-arm :
1212 runs-on : macos-latest
13- env :
14- TAG : ${{ github.ref_name }}
1513 steps :
1614 - uses : actions/checkout@v4
1715 - name : Install dependencies
4240
4341 build-mac-intel :
4442 runs-on : macos-13
45- env :
46- TAG : ${{ github.ref_name }}
4743 steps :
4844 - uses : actions/checkout@v4
4945 - name : Install dependencies
7470
7571 build-linux :
7672 runs-on : ubuntu-latest
77- env :
78- TAG : ${{ github.ref_name }}
7973 steps :
8074 - uses : actions/checkout@v4
8175 - name : Install just
@@ -101,25 +95,29 @@ jobs:
10195
10296 release :
10397 runs-on : ubuntu-latest
98+ permissions :
99+ contents : write
104100 needs : [build-linux, build-mac-arm, build-mac-intel]
105101 if : startsWith(github.event.ref, 'refs/tags/') # only on new tag creation
106- env :
107- TAG : ${{ github.ref_name }}
108102 steps :
109103 - uses : actions/checkout@v4
110104 - name : Download artifact
111105 uses : actions/download-artifact@v4
112106 - name : Create a release
113107 env :
108+ TAG : ${{ github.ref_name }}
114109 GH_TOKEN : ${{ github.token }}
110+ MACOS_ARM : platform-tools-osx-aarch64.tar.bz2
111+ MACOS_INTEL : platform-tools-osx-x86_64.tar.bz2
112+ LINUX : platform-tools-linux-x86_64.tar.bz2
115113 run : |
116114 release_exist=$(gh release view $TAG 2>&1 || exit 0)
117115 if [ "$release_exist" = "release not found" ]; then
118- gh release create $TAG certora-solana-platform-tools/platform-tools-osx-aarch64.tar.bz2 --title "Release $TAG" --generate-notes --latest
119- gh release upload $TAG certora-solana-platform-tools/platform-tools-osx-x86_64.tar.bz2
120- gh release upload $TAG certora-solana-platform-tools/platform-tools-linux-x86_64.tar.bz2
116+ gh release create $TAG $MACOS_ARM/$MACOS_ARM --title "Release $TAG" --generate-notes --latest
117+ gh release upload $TAG $MACOS_INTEL/$MACOS_INTEL
118+ gh release upload $TAG $LINUX/$LINUX
121119 else
122- gh release upload $TAG certora-solana-platform-tools/platform-tools-osx-aarch64.tar.bz2
123- gh release upload $TAG certora-solana-platform-tools/platform-tools-osx-x86_64.tar.bz2
124- gh release upload $TAG certora-solana-platform-tools/platform-tools-linux-x86_64.tar.bz2
120+ gh release upload $TAG $MACOS_ARM/$MACOS_ARM
121+ gh release upload $TAG $MACOS_INTEL/$MACOS_INTEL
122+ gh release upload $TAG $LINUX/$LINUX
125123 fi
0 commit comments