Skip to content

Commit b577429

Browse files
committed
CI: Only publish on main
1 parent 2ad2c73 commit b577429

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
publish:
8787
name: Publish to crates.io
8888
runs-on: ubuntu-latest
89-
if: ${{ startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch' }}
89+
if: ${{ (startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main' }}
9090
needs: [check_format, build_workspace, build_lib_all_features, build_lib_no_default_features]
9191
steps:
9292
- uses: actions/checkout@v4

.github/workflows/pysplashsurf_CI.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ jobs:
316316
publish:
317317
name: Publish to PyPI
318318
runs-on: ubuntu-latest
319-
if: ${{ startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch' }}
319+
if: ${{ (startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch') && github.ref == 'refs/heads/main' }}
320320
needs: [linux_wheels, macos_wheels, windows_wheels, sdist, tests, docs]
321321
steps:
322322
- uses: actions/download-artifact@v4

0 commit comments

Comments
 (0)