-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (68 loc) · 2.24 KB
/
create-release-pr.yml
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Create Pull Request
on:
issue_comment:
types:
- created
permissions:
contents: true
pull-request: write
jobs:
create pull request:
if: |
github.event_name == 'issue_comment' &&
(github.event.comment.author_association == 'MEMBER' || github.event.comment.author_assoiciation == 'OWNER') &&
startsWith(github.event.comment.body, '/create release')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup NodeJS
uses: actions/setup-node@v3
with:
node-version: 20.x
- name: Setup PNPM
uses: pnpm/action-setup@v2
with:
version: 8.11
- name: Install
run: pnpm run install
- name: GIT Identity
run: |
git config --global user.name '${GITHUB_ACTOR}'
git config --global user.email '${GITHUB_ACTOR}@uses.noreply.github.com'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ACTOR: ${{ github.actor }}
- name: VersionUP Commit
run: |
pnpm run versionup --yes
- name: Set Current CHANGELOG to output
id: changelog
shell: bash -ex {0}
run: |
version=$(node -p 'require("./lerna.json").version')
echo "::set-output name=version::$(version)"
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'Update v${{ steps.changelog.outputs.version }}'
committer: Github <noreply@github.com>
author: '${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>'
title: 'v${{ steps.changelog.outputs.version }}'
body: |
## v${{ steps.changelog.outputs.version }}
### Breaking Changes:
- [ ] TODO
### Features:
- [ ] TODO
### Bug Fixes
- [ ] TODO
labels: 'Type: Release'
branch: release/next
request-to-parent: false
- name: Check Outputs
run: |
echo "Pull Request Number - ${{ env.PULL_REQUEST_NUMBER }}"
echo "Pull Request Number - ${{ steps.cpr.outputs.pr_number }}"