diff --git a/README.md b/README.md index 13bada0a..7775b6dd 100644 --- a/README.md +++ b/README.md @@ -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) | @@ -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 diff --git a/action.yml b/action.yml index fba42e99..e014a32b 100644 --- a/action.yml +++ b/action.yml @@ -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 diff --git a/dist/index.js b/dist/index.js index 0cb313d4..bab00ee7 100644 --- a/dist/index.js +++ b/dist/index.js @@ -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') @@ -92,6 +93,7 @@ async function main () { changelogPath, changelogSections, versionFile, + extraFiles, includeComponentInTag: monorepoTags, pullRequestTitlePattern, draftPullRequest diff --git a/index.js b/index.js index 575398e5..d2b7fa86 100644 --- a/index.js +++ b/index.js @@ -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') @@ -85,6 +86,7 @@ async function main () { changelogPath, changelogSections, versionFile, + extraFiles, includeComponentInTag: monorepoTags, pullRequestTitlePattern, draftPullRequest