-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
46 lines (39 loc) · 1.4 KB
/
enter-pre-release-mode.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
45
46
name: Enter pre-release mode
on: workflow_dispatch
jobs:
enter-pre-release-mode:
if: ${{ github.ref == 'refs/heads/beta/release-next' || github.ref == 'refs/heads/canary' }}
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
id-token: write
steps:
- name: Checkout branch
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install
uses: ./.github/common-actions/install
- name: Enter pre-release mode
id: enter-pre-release-mode
run: |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
if [ ${{ github.ref }} == 'refs/heads/canary' ]; then
pnpm changeset:canary
else
pnpm changeset:beta
fi
git add -A
git commit -m 'chore(pre-release): enter pre-release mode'
# Create a new branch and push changes
git checkout -b changeset-branch
git push --set-upstream origin changeset-branch
- name: Create pull request to canary
uses: peter-evans/create-pull-request@v3
with:
title: "Pre-release changes for canary"
body: "This PR includes pre-release changes for the canary branch."
base: canary
head: changeset-branch