Skip to content

Commit 76e1826

Browse files
committed
Update CI/CD workflow to trigger releases on labeled pull requests
- Modified the workflow to include pull request events with a 'labeled' type for triggering releases. - Adjusted the release job condition to allow releases from both push events and labeled pull requests.
1 parent 97cbcf8 commit 76e1826

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/publish.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: CI/CD
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
pull_request:
6+
types: [labeled]
47

58
env:
69
CI: true
@@ -55,7 +58,9 @@ jobs:
5558
name: Release
5659
runs-on: ubuntu-latest
5760
needs: test
58-
if: github.event_name == 'push' && !contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')
61+
if: |
62+
(github.event_name == 'push' && !contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')) ||
63+
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'release'))
5964
steps:
6065
- uses: actions/checkout@v4
6166
with:

0 commit comments

Comments
 (0)