From 280c20ce1740baa95ca128d4a3b50aaf8ed078c9 Mon Sep 17 00:00:00 2001 From: BjornFJohansson Date: Fri, 8 Dec 2023 08:40:19 +0000 Subject: [PATCH] Only build from master & testpypi --- .github/workflows/pydna_pypi_build_workflow.yml | 4 ++-- .github/workflows/pydna_test_pypi_build_workflow.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pydna_pypi_build_workflow.yml b/.github/workflows/pydna_pypi_build_workflow.yml index f3b316ea..6602ca2b 100644 --- a/.github/workflows/pydna_pypi_build_workflow.yml +++ b/.github/workflows/pydna_pypi_build_workflow.yml @@ -1,11 +1,11 @@ -name: Build for PyPI from master branch +name: Build for PyPI on: release: types: [published] jobs: build: runs-on: ubuntu-latest - if: github.ref == 'refs/heads/master' + if: github.event_name == 'release' && contains(github.ref, '/master') steps: - uses: actions/checkout@v3 - name: Build and publish to pypi diff --git a/.github/workflows/pydna_test_pypi_build_workflow.yml b/.github/workflows/pydna_test_pypi_build_workflow.yml index 676d2827..bee4cee4 100644 --- a/.github/workflows/pydna_test_pypi_build_workflow.yml +++ b/.github/workflows/pydna_test_pypi_build_workflow.yml @@ -1,11 +1,11 @@ -name: Build for TESTPyPI from testpypi branch +name: Build for TESTPyPI on: release: types: [published] jobs: build: runs-on: ubuntu-latest - if: github.ref == 'refs/heads/testpypi' + if: github.event_name == 'release' && contains(github.ref, '/testpypi') steps: - uses: actions/checkout@v3 - name: Build and publish to pypi