44 push :
55 tags :
66 - " v*"
7+ create :
78
89permissions :
910 contents : read
@@ -20,6 +21,9 @@ concurrency:
2021
2122jobs :
2223 build :
24+ if : >-
25+ github.event_name != 'create' ||
26+ (github.ref_type == 'tag' && startsWith(github.ref_name, 'v'))
2327 strategy :
2428 matrix :
2529 include :
7579 # docs/development/release.md for why the `release` environment
7680 # gates them and what reviewer rules the maintainer should set
7781 # on it.
78- if : github.repository == 'jeduden/mdsmith'
82+ if : >-
83+ github.repository == 'jeduden/mdsmith' &&
84+ (github.event_name != 'create' ||
85+ (github.ref_type == 'tag' && startsWith(github.ref_name, 'v')))
7986 environment : release
8087 steps :
8188 - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -190,7 +197,10 @@ jobs:
190197 # the operational checklist for npmjs.com / pypi.org / GitHub
191198 # environment configuration. Workflow comments here only record
192199 # the local intent of each setting.
193- if : github.repository == 'jeduden/mdsmith'
200+ if : >-
201+ github.repository == 'jeduden/mdsmith' &&
202+ (github.event_name != 'create' ||
203+ (github.ref_type == 'tag' && startsWith(github.ref_name, 'v')))
194204 environment : release
195205 # `id-token: write` lets `npm publish --provenance` mint an OIDC
196206 # token so the npm registry stamps each tarball with verifiable
@@ -266,7 +276,10 @@ jobs:
266276 # See docs/development/release.md for the canonical PyPI Trusted
267277 # Publisher config (workflow + environment scope) and the
268278 # operational checklist.
269- if : github.repository == 'jeduden/mdsmith'
279+ if : >-
280+ github.repository == 'jeduden/mdsmith' &&
281+ (github.event_name != 'create' ||
282+ (github.ref_type == 'tag' && startsWith(github.ref_name, 'v')))
270283 environment : release
271284 permissions :
272285 contents : read
@@ -308,7 +321,10 @@ jobs:
308321 runs-on : ubuntu-latest
309322 # See docs/development/release.md for the rationale on `if:`,
310323 # `environment:`, and the OIDC + attestations permission set.
311- if : github.repository == 'jeduden/mdsmith'
324+ if : >-
325+ github.repository == 'jeduden/mdsmith' &&
326+ (github.event_name != 'create' ||
327+ (github.ref_type == 'tag' && startsWith(github.ref_name, 'v')))
312328 environment : release
313329 permissions :
314330 contents : write
@@ -369,6 +385,7 @@ jobs:
369385 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
370386 uses : softprops/action-gh-release@72f2c25fcb47643c292f7107632f7a47c1df5cd8 # v2.3.2
371387 with :
388+ draft : ${{ github.event_name == 'create' }}
372389 generate_release_notes : true
373390 files : |
374391 mdsmith-*
@@ -477,7 +494,10 @@ jobs:
477494 # GitHub Actions as the source.
478495 name : Deploy mdsmith.dev to GitHub Pages
479496 needs : [build]
480- if : github.repository == 'jeduden/mdsmith'
497+ if : >-
498+ github.repository == 'jeduden/mdsmith' &&
499+ (github.event_name != 'create' ||
500+ (github.ref_type == 'tag' && startsWith(github.ref_name, 'v')))
481501 runs-on : ubuntu-latest
482502 permissions :
483503 contents : read
0 commit comments