-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: add continuous (PREVIEW) releases
- Loading branch information
1 parent
7fbd1de
commit 8e941eb
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: continuous (Preview) releases | ||
on: | ||
pull_request_review: | ||
types: [submitted] | ||
pull_request: | ||
types: [labeled] | ||
|
||
jobs: | ||
approved: | ||
if: github.event.review.state == 'APPROVED' && !contains(github.event.pull_request.labels.name, 'DO NOT PREVIEW RELEASE') || contains(github.event.pull_request.labels.name, 'Bypass check - PREVIEW RELEASE') || (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.name, 'PR Manual CI RUN')) | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- run: corepack enable | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: "npm" | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- run: npx pkg-pr-new publish | ||
|
||
- name: Remove Manual PR Run label | ||
if: github.event_name == 'pull_request' && contains(github.event.pull_request.labels.name, 'PR Manual CI RUN') | ||
uses: actions-ecosystem/action-remove-labels@v1 | ||
with: | ||
labels: PR Manual CI RUN |