Skip to content

Commit 2fb25e3

Browse files
committed
Only publish on crates.io if the workflow event is called 'Release'
1 parent 8c1ffda commit 2fb25e3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/publish.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# This is triggered after the Release workflow successfully completes its run
2+
name: Publish on crates.io
23
on:
34
workflow_run:
45
workflows:
@@ -10,8 +11,10 @@ env:
1011
jobs:
1112
cargo-publish:
1213
runs-on: ubuntu-latest
13-
if: ${{ github.event.workflow_run.conclusion == 'success' }}
14+
if: ${{ (github.event.workflow_run.conclusion == 'success') && (github.event.workflow.name == 'Release') }}
1415
steps:
16+
- name: Print workflow event name
17+
run: echo "${{ github.event.workflow.name }}"
1518
- name: Checkout sources
1619
uses: actions/checkout@v4
1720
- name: Install stable toolchain

0 commit comments

Comments
 (0)