File tree Expand file tree Collapse file tree 4 files changed +75
-1
lines changed Expand file tree Collapse file tree 4 files changed +75
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : Merge Release PR
2
+
3
+ on :
4
+ pull_request_review :
5
+ types : [submitted]
6
+
7
+ jobs :
8
+ pr_approved :
9
+ if : ${{ github.event.review.state == 'approved' && github.event.pull_request.base.ref == 'master' && github.event.pull_request.head.ref == 'next' }}
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - name : Clone git repo
13
+ uses : actions/checkout@v4
14
+ with :
15
+ fetch-depth : 0
16
+
17
+ - name : Merge PR
18
+ run : |
19
+ git checkout master
20
+ git merge --ff origin/next
21
+ git push -u origin master
22
+ - uses : benc-uk/workflow-dispatch@v1
23
+ with :
24
+ workflow : release.yaml
25
+ ref : master
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ permissions:
11
11
pull-requests : read
12
12
13
13
jobs :
14
- main :
14
+ lint :
15
15
name : pr-lint
16
16
runs-on : ubuntu-latest
17
17
steps :
Original file line number Diff line number Diff line change
1
+ name : Release PR
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - next
7
+
8
+ permissions :
9
+ contents : read
10
+
11
+ jobs :
12
+ release_pr :
13
+ permissions :
14
+ issues : write
15
+ pull-requests : write
16
+ contents : write
17
+ runs-on : ubuntu-latest
18
+ steps :
19
+ - uses : actions/checkout@v4
20
+ with :
21
+ fetch-depth : 0
22
+
23
+ - uses : actions/setup-node@v4
24
+ with :
25
+ node-version-file : ' .nvmrc'
26
+
27
+ - name : Install Dependencies
28
+ run : npm clean-install
29
+
30
+ - name : Generate Changes
31
+ env :
32
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
33
+ run : |
34
+ set -ex
35
+ echo '# Release Changes' > changes.md
36
+ npx [email protected] -d -p '@semantic-release/release-notes-generator' -b next | grep -v semantic-release | tee -a changes.md
37
+ printf '\n---\n\n### Approve this PR to release above packages!' >> changes.md
38
+ - name : Create PR
39
+ env :
40
+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
41
+ run : |
42
+ set -ex
43
+ export PR_NUMBER=$(gh pr list -B master -H next --json number | jq -r '.[0].number')
44
+ if [[ "$(git rev-parse origin/master)" == "$(git rev-parse origin/next)" ]]; then exit 0; fi
45
+ if [[ "$PR_NUMBER" == "null" ]]; then gh pr create -B master -H next -t "chore: release" -F changes.md; fi
46
+ if [[ "$PR_NUMBER" != "null" ]]; then gh pr edit $PR_NUMBER -F changes.md; fi
Original file line number Diff line number Diff line change 4
4
push :
5
5
branches :
6
6
- master
7
+ workflow_dispatch :
7
8
8
9
permissions :
9
10
contents : read
17
18
runs-on : ubuntu-22.04
18
19
steps :
19
20
- uses : actions/checkout@v4
21
+ with :
22
+ ref : master
20
23
21
24
- uses : docker/login-action@v3
22
25
with :
You can’t perform that action at this time.
0 commit comments