Skip to content

Commit 5d64d63

Browse files
committed
Modifying dispatch input [skip ci]
1 parent 01613aa commit 5d64d63

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

.github/workflows/publish.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
name: "Publish"
22

3-
on: [push,workflow_dispatch]
4-
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
inputs:
9+
Command:
10+
description: 'Publish command'
511
jobs:
612
build:
713
name: Build and Test
@@ -46,7 +52,8 @@ jobs:
4652
vsix-file: ${{ github.event.repository.name }}.vsix
4753

4854
- name: Publish extension to Marketplace
49-
if: ${{ contains(github.event.head_commit.message, '[release]') }}
55+
id: publish_vsix
56+
if: ${{ (github.event_name == 'push' && contains(github.event.head_commit.message, '[release]')) || (github.event_name == 'workflow_dispatch' && contains(github.event.inputs.Command, '[release]')) }}
5057
continue-on-error: true # remove after VS bug fix
5158
uses: cezarypiatek/[email protected]
5259
with:

0 commit comments

Comments
 (0)