Skip to content

Commit

Permalink
Merge pull request #4 from coralogix/feature/sc-2965
Browse files Browse the repository at this point in the history
Tweak github actions to publish for mac arm, change artifact naming
  • Loading branch information
saraiva132 authored Apr 21, 2022
2 parents d4baf9d + 428e365 commit 3586746
Showing 1 changed file with 32 additions and 6 deletions.
38 changes: 32 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
types: [published]

jobs:
release-linux:
release-linux-amd64:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
Expand All @@ -32,12 +32,12 @@ jobs:
- name: Upload binary to release
run: |
TAG_NAME=${GITHUB_REF#refs/tags/}
cp target/release/protofetch protofetch-linux
gh release upload $TAG_NAME protofetch-linux
cp target/release/protofetch protofetch_linux_amd64
gh release upload $TAG_NAME protofetch_linux_amd64
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

release-mac:
release-mac-amd64:
runs-on: macos-latest
steps:
- name: Checkout sources
Expand All @@ -57,7 +57,33 @@ jobs:
- name: Upload binary to release
run: |
TAG_NAME=${GITHUB_REF#refs/tags/}
cp target/release/protofetch protofetch-macos
gh release upload $TAG_NAME protofetch-macos
cp target/release/protofetch protofetch_darwin_arm64
gh release upload $TAG_NAME protofetch_darwin_arm64
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

release-mac-arm64:
runs-on: macos-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
target: aarch64-apple-darwin

- name: Build for release
run: cargo build --release

- name: Upload binary to release
run: |
TAG_NAME=${GITHUB_REF#refs/tags/}
cp target/release/protofetch protofetch_darwin_amd64
gh release upload $TAG_NAME protofetch_darwin_amd64
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 comments on commit 3586746

Please sign in to comment.