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

Commit

Permalink
feat: add extra-files input (#410)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcornaz authored Jan 17, 2022
1 parent de7494d commit a487a5b
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 0 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ Automate releases with Conventional Commit Messages.
| `monorepo-tags` | add prefix to tags and branches, allowing multiple libraries to be released from the same repository. |
| `changelog-types` | A JSON formatted String containing to override the outputted changelog sections |
| `version-file` | provide a path to a version file to increment (used by ruby releaser) |
| `extra-files` | add extra-files to bump using the [generic updater](https://github.com/googleapis/release-please/blob/main/docs/customizing.md#updating-arbitrary-files) |
| `fork` | Should the PR be created from a fork. Default `false`|
| `command` | release-please command to run, either `github-release`, or `release-pr`, `manifest`, `manifest-pr` (_defaults to running both_) |
| `default-branch` | branch to open pull release PR against (detected by default) |
Expand Down Expand Up @@ -271,6 +272,30 @@ jobs:
git push origin v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}
```

## Adding additional files

You can update additional files with the `extra-files` input.

See the [generic updater docs](https://github.com/googleapis/release-please/blob/main/docs/customizing.md#updating-arbitrary-files) for more info on how release-please will update those files.

```yaml
on:
push:
branches:
- main
name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: GoogleCloudPlatform/release-please-action@v3
with:
release-type: node
extra-files: |
README.md
docs/getting-started.md
```

## License

Apache Version 2.0
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ inputs:
description: 'provide a path to a version file to increment (used by ruby releaser)'
required: false
default: ''
extra-files:
description: 'extra files to bump using the generic updater'
required: false
default: ''
default-branch:
description: 'branch to open pull release PR against (detected by default)'
required: false
Expand Down
2 changes: 2 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ async function main () {
const changelogTypes = core.getInput('changelog-types') || undefined
const changelogSections = changelogTypes && JSON.parse(changelogTypes)
const versionFile = core.getInput('version-file') || undefined
const extraFiles = core.getMultilineInput('extra-files') || undefined
const github = await getGitHubInstance()
const pullRequestTitlePattern = core.getInput('pull-request-title-pattern') || undefined
const draft = core.getBooleanInput('draft')
Expand All @@ -92,6 +93,7 @@ async function main () {
changelogPath,
changelogSections,
versionFile,
extraFiles,
includeComponentInTag: monorepoTags,
pullRequestTitlePattern,
draftPullRequest
Expand Down
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ async function main () {
const changelogTypes = core.getInput('changelog-types') || undefined
const changelogSections = changelogTypes && JSON.parse(changelogTypes)
const versionFile = core.getInput('version-file') || undefined
const extraFiles = core.getMultilineInput('extra-files') || undefined
const github = await getGitHubInstance()
const pullRequestTitlePattern = core.getInput('pull-request-title-pattern') || undefined
const draft = core.getBooleanInput('draft')
Expand All @@ -85,6 +86,7 @@ async function main () {
changelogPath,
changelogSections,
versionFile,
extraFiles,
includeComponentInTag: monorepoTags,
pullRequestTitlePattern,
draftPullRequest
Expand Down

0 comments on commit a487a5b

Please sign in to comment.