From c0ab718b655c31a67d9afc0d3230696151559689 Mon Sep 17 00:00:00 2001 From: Craig Kavan Pinto Date: Thu, 10 Jul 2025 12:26:16 +0200 Subject: [PATCH 1/4] upload-artifact@v4 --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 100255d..3448bbf 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -43,7 +43,7 @@ jobs: run: python -m twine check dist/* - name: Upload build artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: built-package path: dist/* From c453d3993c5c6d5b5f68150df235fbd251062add Mon Sep 17 00:00:00 2001 From: Craig Kavan Pinto Date: Thu, 10 Jul 2025 12:31:50 +0200 Subject: [PATCH 2/4] update pipeline --- .github/workflows/publish.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 3448bbf..a21daab 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -21,8 +21,8 @@ jobs: name: Dry-Run Build & Check runs-on: ubuntu-latest - # Only on PRs or manual; skip on 'push to main' - if: ${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }} + # Only on PRs skip on 'push to main' + if: github.event_name != 'push' steps: - name: Check out code uses: actions/checkout@v4 @@ -54,7 +54,7 @@ jobs: needs: dry-run # Only fire on the push-to-main that completes the PR - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} + if: github.event_name == 'push' && github.ref == 'refs/heads/main' steps: - name: Check out code uses: actions/checkout@v4 From 1988bd82fb368754b5544e00c67a2f4a01dfd93e Mon Sep 17 00:00:00 2001 From: Craig Kavan Pinto Date: Thu, 10 Jul 2025 12:36:05 +0200 Subject: [PATCH 3/4] dry run condition --- .github/workflows/publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a21daab..ceed01f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -21,8 +21,8 @@ jobs: name: Dry-Run Build & Check runs-on: ubuntu-latest - # Only on PRs skip on 'push to main' - if: github.event_name != 'push' + # Allow dry-run on all events except when pushing to main + if: github.event_name != 'push' || github.ref != 'refs/heads/main' steps: - name: Check out code uses: actions/checkout@v4 From a5cb2d027d94f2d53f77018156f51eb300e0ec5e Mon Sep 17 00:00:00 2001 From: Craig Kavan Pinto Date: Thu, 10 Jul 2025 12:48:35 +0200 Subject: [PATCH 4/4] use master not main --- .github/workflows/publish.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ceed01f..209736d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,12 +4,12 @@ on: # Dry-run triggers pull_request: branches: - - main + - master workflow_dispatch: # Publish trigger: only when the PR merge commits are pushed to main push: branches: - - main + - master permissions: contents: read # for checkout @@ -21,8 +21,8 @@ jobs: name: Dry-Run Build & Check runs-on: ubuntu-latest - # Allow dry-run on all events except when pushing to main - if: github.event_name != 'push' || github.ref != 'refs/heads/main' + # Allow dry-run on all events except when pushing to master + if: github.event_name != 'push' || github.ref != 'refs/heads/master' steps: - name: Check out code uses: actions/checkout@v4 @@ -53,8 +53,8 @@ jobs: runs-on: ubuntu-latest needs: dry-run - # Only fire on the push-to-main that completes the PR - if: github.event_name == 'push' && github.ref == 'refs/heads/main' + # Only fire on the push-to-master that completes the PR + if: github.event_name == 'push' && github.ref == 'refs/heads/master' steps: - name: Check out code uses: actions/checkout@v4