Skip to content
This repository was archived by the owner on Aug 15, 2024. It is now read-only.

Commit 7677480

Browse files
author
Benjamin E. Coe
authored
feat(release-please): add signoff options to sign off commits (#374)
1 parent 526ef9c commit 7677480

6 files changed

Lines changed: 70 additions & 39 deletions

File tree

.github/workflows/release-please.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
needs: [build]
6161
steps:
6262
- id: release-pr
63-
uses: GoogleCloudPlatform/release-please-action@v2
63+
uses: GoogleCloudPlatform/release-please-action@main
6464
with:
6565
token: ${{ secrets.ACTIONS_BOT_TOKEN }}
6666
release-type: node
@@ -85,7 +85,7 @@ jobs:
8585
runs-on: ubuntu-latest
8686
needs: [build]
8787
steps:
88-
- uses: GoogleCloudPlatform/release-please-action@v2
88+
- uses: GoogleCloudPlatform/release-please-action@main
8989
id: release
9090
with:
9191
token: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ Automate releases with Conventional Commit Messages.
6161
| `pull-request-title-pattern` | title pattern used to make release PR, defaults to using `chore${scope}: release${component} ${version}`. |
6262
| `changelog-path` | configure alternate path for `CHANGELOG.md`. Default `CHANGELOG.md` |
6363
| `github-api-url` | configure github API URL. Default `https://api.github.com` |
64+
| `--signoff` | Add [`Signed-off-by`](https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---signoff) line at the end of the commit log message using the user and email provided. (format "Name \<email@example.com\>") |
6465

6566
| output | description |
6667
|:---:|---|

action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ inputs:
6868
description: 'where can the manifest file be found in the project?'
6969
required: false
7070
default: ''
71+
signoff:
72+
description: 'Add [`Signed-off-by`](https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---signoff) line at the end of the commit log message using the user and email provided. (format "Name \<email@example.com\>")'
73+
required: false
74+
default: ''
7175

7276
runs:
7377
using: 'node12'

index.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ const GITHUB_RELEASE_COMMAND = 'github-release'
99
const GITHUB_RELEASE_PR_COMMAND = 'release-pr'
1010
const GITHUB_API_URL = 'https://api.github.com'
1111

12+
const signoff = core.getInput('signoff') || undefined
13+
1214
function getBooleanInput (input) {
1315
const trueValue = ['true', 'True', 'TRUE', 'yes', 'Yes', 'YES', 'y', 'Y', 'on', 'On', 'ON']
1416
const falseValue = ['false', 'False', 'FALSE', 'no', 'No', 'NO', 'n', 'N', 'off', 'Off', 'OFF']
@@ -31,7 +33,8 @@ function getGitHubInput () {
3133
function getManifestInput () {
3234
return {
3335
configFile: core.getInput('config-file') || CONFIG_FILE,
34-
manifestFile: core.getInput('manifest-file') || MANIFEST_FILE
36+
manifestFile: core.getInput('manifest-file') || MANIFEST_FILE,
37+
signoff
3538
}
3639
}
3740

@@ -135,7 +138,8 @@ async function main () {
135138
changelogSections,
136139
versionFile,
137140
defaultBranch,
138-
pullRequestTitlePattern
141+
pullRequestTitlePattern,
142+
signoff
139143
})
140144

141145
if (pr) {

package-lock.json

Lines changed: 56 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"homepage": "https://github.com/bcoe/release-please-action#readme",
2727
"dependencies": {
2828
"@actions/core": "^1.2.6",
29-
"release-please": "^11.24.2"
29+
"release-please": "^12.2.0"
3030
},
3131
"devDependencies": {
3232
"@vercel/ncc": "^0.27.0",

0 commit comments

Comments
 (0)