Skip to content

Commit ca9d877

Browse files
authored
chore: run preview release on all pull requests (#2526)
1 parent 4fbc90a commit ca9d877

File tree

1 file changed

+6
-21
lines changed

1 file changed

+6
-21
lines changed

.github/workflows/release-preview.yml

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,16 @@
11
name: release-preview
22

33
on:
4-
pull_request_review:
5-
types: [submitted]
4+
pull_request:
5+
push:
6+
branches:
7+
- '**'
8+
tags:
9+
- '!**'
610
workflow_dispatch:
711

812
jobs:
9-
check:
10-
# Trigger the permissions check whenever someone approves a pull request.
11-
# They must have the write permissions to the repo in order to
12-
# trigger preview package publishing.
13-
if: github.event_name == 'workflow_dispatch' || github.event.review.state == 'approved'
14-
runs-on: ubuntu-latest
15-
outputs:
16-
has-permissions: ${{ steps.checkPermissions.outputs.require-result }}
17-
steps:
18-
- name: Check permissions
19-
id: checkPermissions
20-
uses: actions-cool/check-user-permission@v2
21-
with:
22-
require: 'write'
23-
2413
publish:
25-
# The approving user must pass the permissions check
26-
# to trigger the preview publish.
27-
needs: check
28-
if: github.event_name == 'workflow_dispatch' || needs.check.outputs.has-permissions == 'true'
2914
runs-on: macos-latest
3015
steps:
3116
- name: Checkout

0 commit comments

Comments
 (0)