You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Also, the following environment variables can be used for the config:
@@ -43,18 +54,45 @@ Also, the following environment variables can be used for the config:
43
54
-`GITHUB_PR_RELEASE_BASE`
44
55
-`GITHUB_PR_RELEASE_ENDPOINT`
45
56
57
+
### CLI
58
+
59
+
You can create a release pull request by the following command:
60
+
61
+
```sh
62
+
❯ npx github-pr-release owner/repo --head master --base production
63
+
# `GITHUB_PR_RELEASE_TOKEN` is required
64
+
```
65
+
66
+
`--help`:
67
+
68
+
```
69
+
❯ npx github-pr-release --help
70
+
Usage: github-pr-release [repo]
71
+
72
+
Options:
73
+
--help Show help [boolean]
74
+
--version Show version number [boolean]
75
+
--head [default: "master"]
76
+
--base [default: "production"]
77
+
78
+
Examples:
79
+
github-pr-release uiur/github-pr-release --head master --base production
80
+
```
46
81
47
82
## Install
83
+
48
84
```
49
85
npm install github-pr-release
50
86
```
51
87
52
88
## Tips
89
+
53
90
### Pull request titles
54
91
55
92
If one of pull requests of which consist a release pull request has a title like "Bump to v1.0", the title of the release pull request becomes "Release v1.0". Otherwise, it uses timestamps like "Release 2000-01-01 00:00:00" in local timezone.
56
93
57
94
### Specify a message format
95
+
58
96
You can specify a template to change the message format. Pass a template path to `config.template`.
59
97
60
98
```javascript
@@ -76,6 +114,7 @@ Release {{version}}
76
114
```
77
115
78
116
### GitHub Enterprise
117
+
79
118
If you use this plugin in GitHub Enterprise, you can specify endpoint domain for GitHub Enterprise.
80
119
81
120
```javascript
@@ -89,10 +128,43 @@ release({
89
128
90
129
## Example
91
130
131
+
### GitHub Actions
132
+
133
+
Creating release pull requests can be automated using GitHub Actions.
134
+
135
+
Create `.github/workflows/create-pr-release.yml` with the following content:
136
+
137
+
```yml
138
+
name: Create release pull requests
139
+
140
+
on:
141
+
push:
142
+
branches: [master]
143
+
144
+
jobs:
145
+
build:
146
+
runs-on: ubuntu-latest
147
+
148
+
steps:
149
+
- uses: actions/checkout@v2
150
+
- uses: actions/setup-node@v2
151
+
with:
152
+
node-version: 16.x
153
+
cache: "yarn"
154
+
155
+
- run: yarn install
156
+
- name: Create release pull requests
157
+
run: |
158
+
npx github-pr-release $GITHUB_REPOSITORY --head master --base production
0 commit comments