Skip to content

Commit

Permalink
ci: Separate macOS and Linux workflows
Browse files Browse the repository at this point in the history
Signed-off-by: Maksim Dimitrov <[email protected]>
  • Loading branch information
dimitrovmaksim committed Sep 11, 2023
1 parent 01de092 commit dc1ce39
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
name: [linux-18, linux-20, linux-22, macos-10.15, macos-11]
name: [linux-18, linux-20, linux-22]

include:
- name: linux-18
Expand All @@ -30,14 +30,6 @@ jobs:
os: ubuntu-22.04
artifact_name: matchstick
asset_name: binary-linux-22
- name: macos-10.15
os: macos-10.15
artifact_name: matchstick
asset_name: binary-macos-10.15
- name: macos-11
os: macos-11
artifact_name: matchstick
asset_name: binary-macos-11

steps:
- uses: actions/checkout@v3
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/release-macos-intel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Release (MacOS, Linux)

on:
release:
types:
- created

env:
CARGO_TERM_COLOR: always

jobs:
deploy:
name: Deploy for ${{ matrix.os }}
if: startsWith(github.ref, 'refs/tags')
runs-on: ${{ matrix.os }}
strategy:
matrix:
name: [macos-10.15, macos-11]

include:
- name: macos-10.15
os: macos-10.15
artifact_name: matchstick
asset_name: binary-macos-10.15
- name: macos-11
os: macos-11
artifact_name: matchstick
asset_name: binary-macos-11

steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.68.0
- run: brew install protobuf

- name: Build
run: cargo build --release && mv target/release/${{ matrix.artifact_name }} target/release/${{ matrix.asset_name }}

- name: Upload binaries to release
run: echo ${{ secrets.GITHUB_TOKEN }} | gh auth login --with-token && gh release upload ${GITHUB_REF##*/} target/release/${{ matrix.asset_name }}

0 comments on commit dc1ce39

Please sign in to comment.