-
Notifications
You must be signed in to change notification settings - Fork 159
44 lines (37 loc) · 1.35 KB
/
experimental-pr.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Experimental PR Creation
on:
pull_request:
types: [labeled]
jobs:
create-experimental-pr:
if: github.event.label.name == 'experimental'
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout main branch
uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
- name: Create or update the experimental branch
run: git push origin main:refs/heads/experimental --force
- name: Checkout the PR branch
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Create PR to experimental
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
PR_TITLE: ${{ github.event.pull_request.title }}
SOURCE_BRANCH: ${{ github.event.pull_request.head.ref }}
run: |
gh pr create \
--base experimental \
--head "$SOURCE_BRANCH" \
--title "chore: 🧪 release ($PR_TITLE)" \
--body "This PR was automatically created from #$PR_NUMBER when the 'experimental' label was added.
Merging this PR will trigger an experimental package release to the NPM registry.
You will be able to install it with \`npm install @redocly/cli@experimental\`."