From 72ad2752849621446fd1df7ebc0b85dc4d9cf4cd Mon Sep 17 00:00:00 2001 From: Andrew Smith Date: Wed, 22 Nov 2023 18:43:34 +0000 Subject: [PATCH] chore: update GitHub workflow for releases --- .github/workflows/ci.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6ad27f5e..ee9ae85f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,11 @@ name: CI/CD -on: [pull_request, push, workflow_dispatch] +on: + push: + branches: + - main + pull_request: + workflow_dispatch: jobs: test: @@ -31,7 +36,7 @@ jobs: uses: codecov/codecov-action@v1 publish: needs: test - if: ${{ !startsWith(github.event.head_commit.message, 'bump') && !startsWith(github.event.head_commit.message, 'chore') && github.ref == 'refs/heads/main' && github.event_name == 'push' && github.repository_owner == 'supabase-community' }} + if: ${{ !startsWith(github.event.head_commit.message, 'bump') && !startsWith(github.event.head_commit.message, 'chore') && github.ref == 'refs/heads/main' && contains(fromJSON('["push", "workflow_dispatch"]'), github.event_name) && github.repository_owner == 'supabase-community' }} runs-on: ubuntu-latest name: "Bump version, create changelog and publish" environment: @@ -46,6 +51,7 @@ jobs: with: ref: ${{ github.ref }} fetch-depth: 0 + token: ${{ secrets.SILENTWORKS_PAT }} - name: Python Semantic Release id: release uses: python-semantic-release/python-semantic-release@v8.0.0