Skip to content

Commit 35826b3

Browse files
authored
Merge pull request #8 from Certora/oz/release
Fix release
2 parents 59cacf3 + c06f294 commit 35826b3

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

.github/workflows/main.yml

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ on:
1010
jobs:
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
@@ -42,8 +40,6 @@ jobs:
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
@@ -74,8 +70,6 @@ jobs:
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

Comments
 (0)