From 4a67a7cc9309ea677127fb278d188687d7a55e23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Koz=C5=82owski?= Date: Wed, 10 May 2023 17:23:57 +0200 Subject: [PATCH 1/5] Run CI on branches, run tests on non-PRs too --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c797823..e8f7a4a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,13 +1,13 @@ on: push: tags: ["v*"] + branches: ["**"] pull_request: - branches: ["*"] + branches: ["**"] name: Build and deploy jobs: build: - if: github.event_name == 'pull_request' name: Test runs-on: ubuntu-latest steps: From d064da8183fa1e446f518b8b46cbcbb039d66b86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Koz=C5=82owski?= Date: Wed, 10 May 2023 17:26:30 +0200 Subject: [PATCH 2/5] all prs --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e8f7a4a..b67d7a1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,7 +3,6 @@ on: tags: ["v*"] branches: ["**"] pull_request: - branches: ["**"] name: Build and deploy jobs: From eecac07d1f6783b75ff0fa3e8dfd715df3c74525 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Koz=C5=82owski?= Date: Wed, 10 May 2023 17:27:03 +0200 Subject: [PATCH 3/5] deploy needs build --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b67d7a1..c2770a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,6 +21,7 @@ jobs: deploy: if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v')) + needs: build name: Publish runs-on: ubuntu-latest steps: From 4b1f25664a918b99e2ae7a94f2fd06dcc4b15508 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Koz=C5=82owski?= Date: Wed, 10 May 2023 17:27:54 +0200 Subject: [PATCH 4/5] bump checkout --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c2770a3..5acbbb3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ jobs: name: Test runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Build & test run: yarn ci From d882466dfb8519bb2ad01e94d91dc2127f59df04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Koz=C5=82owski?= Date: Wed, 10 May 2023 17:37:48 +0200 Subject: [PATCH 5/5] only build on main --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5acbbb3..fd0ed0b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,7 @@ on: push: tags: ["v*"] - branches: ["**"] + branches: ["main"] pull_request: name: Build and deploy