Skip to content

Commit 4b1c470

Browse files
Quote title and trigger on label
1 parent 00c8838 commit 4b1c470

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/draft-new-release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ name: "Draft new release"
22

33
on:
44
issues:
5-
types: [opened]
5+
types: [opened, labeled]
66

77
jobs:
88
draft-new-release:
99
runs-on: ubuntu-latest
10-
if: startsWith(github.event.issue.title, 'Release version') # only run for issues with a specific title
10+
if: startsWith(github.event.issue.title, 'Release version') && endsWith(github.event.issue.labels.*.name, 'release') # only run for issues with a specific title and label
1111
steps:
1212
- uses: actions/checkout@v2
1313

1414
- name: Extract version from issue title
1515
run: |
16-
TITLE=${{ github.event.issue.title }}
16+
TITLE="${{ github.event.issue.title }}"
1717
VERSION=${TITLE#Release version }
1818
1919
echo "::set-env name=RELEASE_VERSION::$VERSION"

0 commit comments

Comments
 (0)