Skip to content

Commit f416656

Browse files
feat(workflows): add manual trigger
1 parent a43ac15 commit f416656

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

.github/workflows/build-publish.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ on:
99
- main
1010
tags:
1111
- 'v[0-9]+.[0-9]+.[0-9]+'
12+
workflow_dispatch:
13+
inputs:
14+
branch:
15+
description: 'Branch to publish from'
16+
required: true
17+
type: string
18+
default: 'main'
1219

1320
jobs:
1421
build:
@@ -45,7 +52,9 @@ jobs:
4552
runs-on: ubuntu-latest
4653
needs: build
4754
timeout-minutes: 15
48-
if: startsWith(github.ref, 'refs/tags/v')
55+
if: |
56+
startsWith(github.ref, 'refs/tags/v') ||
57+
github.event_name == 'workflow_dispatch'
4958
strategy:
5059
matrix:
5160
package:
@@ -123,7 +132,9 @@ jobs:
123132
runs-on: ubuntu-latest
124133
needs: publish
125134
timeout-minutes: 5
126-
if: startsWith(github.ref, 'refs/tags/v')
135+
if: |
136+
startsWith(github.ref, 'refs/tags/v') &&
137+
github.event_name != 'workflow_dispatch'
127138
permissions:
128139
contents: write
129140
steps:

0 commit comments

Comments
 (0)