diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 100255d..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 - # Only on PRs or manual; skip on 'push to main' - if: ${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }} + # 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 @@ -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/* @@ -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