Skip to content

Commit d59a61f

Browse files
committed
feat: add prerelease:local label
1 parent f875395 commit d59a61f

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/prerelease.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ permissions:
1414

1515
jobs:
1616
deploy:
17-
if: contains(github.event.pull_request.labels.*.name, 'prerelease')
1817
runs-on: ubuntu-latest
1918
strategy:
2019
matrix:
@@ -27,6 +26,16 @@ jobs:
2726
secret_project_id: VERCEL_PROJECT_ZH_HANT_ID
2827
name: Deploy ${{ matrix.locale }}
2928
steps:
29+
# If the label is 'prerelease', all jobs run.
30+
# If the label is 'prerelease:zh-hant', only the zh-hant job runs, etc.
31+
- name: Skip if not matching label
32+
if: |
33+
github.event_name == 'pull_request' &&
34+
!contains(github.event.pull_request.labels.*.name, 'prerelease') &&
35+
!contains(github.event.pull_request.labels.*.name, format('prerelease:{0}', matrix.locale))
36+
run: |
37+
echo "Skipping deploy for ${{ matrix.locale }} due to missing label."
38+
exit 0
3039
- name: Checkout code
3140
uses: actions/checkout@v3
3241
with:

0 commit comments

Comments
 (0)