From 1a5251701c8a183c5a54d441664c25576ace52a8 Mon Sep 17 00:00:00 2001 From: Oliver Holworthy Date: Wed, 3 May 2023 13:29:33 +0100 Subject: [PATCH] Update pattern used to match tags when running workflows. This pattern ensures we only run these workflows with the tags corresponding to a release. Ignoring other tags like a dev tag `23.05.dev0` --- .github/workflows/cpu-ci.yml | 2 +- .github/workflows/docs-sched-rebuild.yaml | 2 +- .github/workflows/gpu-ci.yml | 2 +- .github/workflows/lint.yaml | 2 +- .github/workflows/merlin.yml | 2 +- .github/workflows/packages.yaml | 6 +++--- .github/workflows/release-drafter.yaml | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/cpu-ci.yml b/.github/workflows/cpu-ci.yml index ec79cdc5a..ba076d62d 100644 --- a/.github/workflows/cpu-ci.yml +++ b/.github/workflows/cpu-ci.yml @@ -5,7 +5,7 @@ on: push: branches: [main] tags: - - v* + - "v[0-9]+.[0-9]+.[0-9]+" pull_request: branches: [main] diff --git a/.github/workflows/docs-sched-rebuild.yaml b/.github/workflows/docs-sched-rebuild.yaml index a3e323464..38f4cd05b 100644 --- a/.github/workflows/docs-sched-rebuild.yaml +++ b/.github/workflows/docs-sched-rebuild.yaml @@ -4,7 +4,7 @@ on: push: branches: [main] tags: - - v* + - "v[0-9]+.[0-9]+.[0-9]+" workflow_dispatch: jobs: diff --git a/.github/workflows/gpu-ci.yml b/.github/workflows/gpu-ci.yml index 4f03dcce8..fc07cec58 100644 --- a/.github/workflows/gpu-ci.yml +++ b/.github/workflows/gpu-ci.yml @@ -5,7 +5,7 @@ on: push: branches: [main] tags: - - v* + - "v[0-9]+.[0-9]+.[0-9]+" pull_request: branches: [main] types: [opened, synchronize, reopened] diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 9159e133a..3d43c304e 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -5,7 +5,7 @@ on: push: branches: [main] tags: - - v* + - "v[0-9]+.[0-9]+.[0-9]+" jobs: pre-commit: diff --git a/.github/workflows/merlin.yml b/.github/workflows/merlin.yml index cbb68af28..d40a20491 100644 --- a/.github/workflows/merlin.yml +++ b/.github/workflows/merlin.yml @@ -5,7 +5,7 @@ on: push: branches: [main] tags: - - v* + - "v[0-9]+.[0-9]+.[0-9]+" pull_request: branches: [main] diff --git a/.github/workflows/packages.yaml b/.github/workflows/packages.yaml index 87e2761ad..311753b3c 100644 --- a/.github/workflows/packages.yaml +++ b/.github/workflows/packages.yaml @@ -5,7 +5,7 @@ on: push: branches: [main] tags: - - v* + - "v[0-9]+.[0-9]+.[0-9]+" pull_request: branches: [main] @@ -103,7 +103,7 @@ jobs: release-pypi: name: Release PyPI Package runs-on: ubuntu-latest - if: "startsWith(github.ref, 'refs/tags/') && ! contains(github.ref, 'dev')" + if: "startsWith(github.ref, 'refs/tags/')" needs: [build-pypi] steps: - uses: actions/download-artifact@v3 @@ -129,7 +129,7 @@ jobs: release-conda: name: Release Conda Package runs-on: ubuntu-latest - if: "startsWith(github.ref, 'refs/tags/') && ! contains(github.ref, 'dev')" + if: "startsWith(github.ref, 'refs/tags/')" needs: [build-conda] steps: - uses: actions/setup-python@v2 diff --git a/.github/workflows/release-drafter.yaml b/.github/workflows/release-drafter.yaml index 3b70bae4a..3bd2b816b 100644 --- a/.github/workflows/release-drafter.yaml +++ b/.github/workflows/release-drafter.yaml @@ -4,7 +4,7 @@ on: push: # trigger on tags only tags: - - v* + - "v[0-9]+.[0-9]+.[0-9]+" workflow_dispatch: