Skip to content

Commit

Permalink
Put everything in the same workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Hubro committed Apr 15, 2023
1 parent 9a43b7d commit 946e523
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/build.yaml

This file was deleted.

27 changes: 22 additions & 5 deletions .github/workflows/release.yaml → .github/workflows/cicd.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,30 @@
name: Create release
name: CI/CD

on:
push:
tags:
- "v*"
on: push

jobs:
test:
name: Check
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Test
run: cargo test --verbose

build-linux:
name: Build Linux binary
needs: [test]
runs-on: ubuntu-latest

strategy:
matrix:
target:
- x86_64-unknown-linux-gnu
- aarch64-unknown-linux-gnu
- i686-unknown-linux-gnu

steps:
- uses: actions/checkout@v3

Expand All @@ -40,12 +50,15 @@ jobs:

build-macos:
name: Build MacOS binary
needs: [test]
runs-on: macos-latest

strategy:
matrix:
target:
- x86_64-apple-darwin
- aarch64-apple-darwin

steps:
- uses: actions/checkout@v3

Expand All @@ -63,12 +76,15 @@ jobs:

build-windows:
name: Build Windows binary
needs: [test]
runs-on: windows-latest

strategy:
matrix:
target:
- x86_64-pc-windows-msvc
- i686-pc-windows-msvc

steps:
- uses: actions/checkout@v3

Expand All @@ -87,6 +103,7 @@ jobs:
create-release:
name: Create release
needs: [build-linux, build-macos, build-windows]
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
runs-on: ubuntu-latest

steps:
Expand Down

0 comments on commit 946e523

Please sign in to comment.