From a739f4680aa371984e67f8df7cec58d17a59a645 Mon Sep 17 00:00:00 2001 From: Hashem Hashem Date: Tue, 10 Jan 2023 09:37:30 +0100 Subject: [PATCH] fix(ci): split release and review jobs into different workflows This fixes goreleaser failing on PRs --- .github/workflows/{ci.yml => release.yml} | 24 +++-------------------- .github/workflows/review.yml | 22 +++++++++++++++++++++ 2 files changed, 25 insertions(+), 21 deletions(-) rename .github/workflows/{ci.yml => release.yml} (66%) create mode 100644 .github/workflows/review.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/release.yml similarity index 66% rename from .github/workflows/ci.yml rename to .github/workflows/release.yml index f455f16..c1590f4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/release.yml @@ -1,16 +1,14 @@ -name: CI +name: Release on: push: branches: - master - pull_request: - branches: - - "*" jobs: - make: + release: runs-on: ubuntu-latest + steps: - name: Setup Sage uses: einride/sage/actions/setup@master @@ -20,22 +18,6 @@ jobs: - name: Make run: make - - name: Report Code Coverage - uses: codecov/codecov-action@v3.1.1 - with: - file: ./build/coverage/go-test.txt - fail_ci_if_error: true - - release: - needs: [make] - runs-on: ubuntu-latest - - steps: - - name: Setup Sage - uses: einride/sage/actions/setup@master - with: - go-version: 1.19 - - name: Create Release uses: go-semantic-release/action@v1.19 with: diff --git a/.github/workflows/review.yml b/.github/workflows/review.yml new file mode 100644 index 0000000..81260d7 --- /dev/null +++ b/.github/workflows/review.yml @@ -0,0 +1,22 @@ +name: Review + +on: + pull_request: + +jobs: + make: + runs-on: ubuntu-latest + steps: + - name: Setup Sage + uses: einride/sage/actions/setup@master + with: + go-version: 1.19 + + - name: Make + run: make + + - name: Report Code Coverage + uses: codecov/codecov-action@v3.1.1 + with: + file: ./build/coverage/go-test.txt + fail_ci_if_error: true