Skip to content

Commit fc74688

Browse files
committed
Fix CI to not run publish all the time
1 parent 59a43e1 commit fc74688

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ env:
1111
jobs:
1212
cargo-publish:
1313
runs-on: ubuntu-latest
14-
if: ${{ (github.event.workflow_run.conclusion == 'success') && (github.event.workflow.name == 'Release') }}
14+
if: ${{ !github.event.pull_request && (github.event.workflow_run.conclusion == 'success') && (github.event.workflow.name == 'Release') }}
1515
steps:
1616
- name: Print workflow event name
1717
run: echo "${{ github.event.workflow.name }}"

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ permissions:
4040
# will be marked as a prerelease.
4141
on:
4242
pull_request:
43+
branches: [ "main" ]
4344
push:
4445
tags:
4546
- '**[0-9]+.[0-9]+.[0-9]+*'

0 commit comments

Comments
 (0)