Skip to content

Commit 3586746

Browse files
authored
Merge pull request #4 from coralogix/feature/sc-2965
Tweak github actions to publish for mac arm, change artifact naming
2 parents d4baf9d + 428e365 commit 3586746

File tree

1 file changed

+32
-6
lines changed

1 file changed

+32
-6
lines changed

.github/workflows/release.yml

+32-6
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
types: [published]
66

77
jobs:
8-
release-linux:
8+
release-linux-amd64:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout sources
@@ -32,12 +32,12 @@ jobs:
3232
- name: Upload binary to release
3333
run: |
3434
TAG_NAME=${GITHUB_REF#refs/tags/}
35-
cp target/release/protofetch protofetch-linux
36-
gh release upload $TAG_NAME protofetch-linux
35+
cp target/release/protofetch protofetch_linux_amd64
36+
gh release upload $TAG_NAME protofetch_linux_amd64
3737
env:
3838
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
3939

40-
release-mac:
40+
release-mac-amd64:
4141
runs-on: macos-latest
4242
steps:
4343
- name: Checkout sources
@@ -57,7 +57,33 @@ jobs:
5757
- name: Upload binary to release
5858
run: |
5959
TAG_NAME=${GITHUB_REF#refs/tags/}
60-
cp target/release/protofetch protofetch-macos
61-
gh release upload $TAG_NAME protofetch-macos
60+
cp target/release/protofetch protofetch_darwin_arm64
61+
gh release upload $TAG_NAME protofetch_darwin_arm64
6262
env:
6363
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
64+
65+
release-mac-arm64:
66+
runs-on: macos-latest
67+
steps:
68+
- name: Checkout sources
69+
uses: actions/checkout@v2
70+
71+
- name: Install stable toolchain
72+
uses: actions-rs/toolchain@v1
73+
with:
74+
profile: minimal
75+
toolchain: stable
76+
override: true
77+
target: aarch64-apple-darwin
78+
79+
- name: Build for release
80+
run: cargo build --release
81+
82+
- name: Upload binary to release
83+
run: |
84+
TAG_NAME=${GITHUB_REF#refs/tags/}
85+
cp target/release/protofetch protofetch_darwin_amd64
86+
gh release upload $TAG_NAME protofetch_darwin_amd64
87+
env:
88+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
89+

0 commit comments

Comments
 (0)