Skip to content

Commit

Permalink
feat: Adding matrix release for different platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslanti committed May 14, 2024
1 parent 6890ad7 commit 5fe4986
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,19 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}

- uses: actions-rs/cargo@v1
coverage:
needs: build
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@v4
with:
submodules: recursive

- uses: actions-rs/toolchain@v1
with:
command: clean
toolchain: nightly
override: true

- uses: actions-rs/cargo@v1
name: Run test with code coverage report
Expand All @@ -73,7 +83,7 @@ jobs:
release:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
needs: build
needs: coverage
steps:
- name: Clone repo
uses: actions/checkout@v4
Expand All @@ -95,13 +105,13 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

release-builds:
build-cli:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]

runs-on: ${{ matrix.os }}

needs: coverage
steps:
- name: Clone repo
uses: actions/checkout@v4
Expand All @@ -118,4 +128,10 @@ jobs:
uses: actions-rs/cargo@v1
with:
command: build
args: --release --bin cli
args: --release --bin cli

- name: Upload target binary
uses: actions/upload-artifact@v4
with:
name: cli-${{ matrix.os }}
path: target/release/cli

0 comments on commit 5fe4986

Please sign in to comment.