Skip to content

Commit d83fb92

Browse files
jaredparCopilot
andauthored
Add [skip publish] support to publish workflow (#90)
When a commit message on main contains [skip publish], the publish workflow will skip the NuGet push. Useful for doc updates or batching multiple PRs before a release. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 6762518 commit d83fb92

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/publish.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ jobs:
1717
runs-on: ubuntu-latest
1818
if: >-
1919
github.event_name == 'workflow_dispatch' ||
20-
(github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success')
20+
(github.event_name == 'workflow_run' &&
21+
github.event.workflow_run.conclusion == 'success' &&
22+
!contains(github.event.workflow_run.head_commit.message, '[skip publish]'))
2123
steps:
2224
- uses: actions/checkout@v4
2325
with:

0 commit comments

Comments
 (0)