Skip to content

Commit 74b2b4b

Browse files
committed
Add functional dry_run input to workflow_dispatch
Gates GitHub release and marketplace publish behind the input rather than implicitly relying on tag presence. Tag pushes still publish (inputs.dry_run is falsy when undefined).
1 parent 13985d6 commit 74b2b4b

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ on:
77
pull_request:
88
branches: [main]
99
workflow_dispatch:
10+
inputs:
11+
dry_run:
12+
description: Dry run (skip GitHub release and marketplace publish)
13+
type: boolean
14+
default: true
1015

1116
jobs:
1217
test:
@@ -163,15 +168,15 @@ jobs:
163168
echo "All VSIX contents verified"
164169
165170
- name: Create or update GitHub release
166-
if: startsWith(github.ref, 'refs/tags/v')
171+
if: startsWith(github.ref, 'refs/tags/v') && !inputs.dry_run
167172
run: |
168173
gh release create "$GITHUB_REF_NAME" git-crypt-vscode-*.vsix --title "$GITHUB_REF_NAME" --generate-notes ||
169174
gh release upload "$GITHUB_REF_NAME" git-crypt-vscode-*.vsix --clobber
170175
env:
171176
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
172177

173178
- name: Publish to marketplace
174-
if: startsWith(github.ref, 'refs/tags/v')
179+
if: ${{ !inputs.dry_run }}
175180
run: npm run publish -- --packagePath git-crypt-vscode-*.vsix
176181
env:
177182
VSCE_PAT: ${{ secrets.VSCE_PAT }}

0 commit comments

Comments
 (0)