Skip to content

Commit

Permalink
ci: create previews for pr with label (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdehaven authored Oct 3, 2023
1 parent 0b27e88 commit 791e8e5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: Tests

on:
pull_request:
types:
- opened
- synchronize
- reopened
- labeled
branches:
- main
- alpha
Expand Down Expand Up @@ -49,7 +54,7 @@ jobs:
- name: Publish package preview
id: package-preview
# Do not run for `alpha` or `beta` branches
if: github.event_name == 'pull_request' && github.actor != 'renovate[bot]' && !contains(github.head_ref || github.ref_name, 'alpha') && !contains(github.head_ref || github.ref_name, 'beta')
if: github.event_name == 'pull_request' && (github.actor != 'renovate[bot]' || contains(github.event.pull_request.labels.*.name, 'create preview package')) && !contains(github.head_ref || github.ref_name, 'alpha') && !contains(github.head_ref || github.ref_name, 'beta')
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN_PUBLIC_PUBLISH }}
run: |
Expand Down

0 comments on commit 791e8e5

Please sign in to comment.