From bbfc5fe01d0232b1a80a17e198163d8457425ac3 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Fri, 1 Dec 2023 11:23:31 -0800 Subject: [PATCH] fix: restore include-component-in-tag default (false) --- README.md | 1 + action.yml | 3 +++ dist/index.js | 2 ++ src/index.ts | 3 +++ 4 files changed, 9 insertions(+) diff --git a/README.md b/README.md index 2e7631fa..6eabde6b 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,7 @@ steps: | `github-api-url` | Override the GitHub API URL. | | `github-graphql-url` | Override the GitHub GraphQL URL | | `fork` | If `true`, send the PR from a fork. This requires the `token` to be a user that can create forks (e.g. not the default `GITHUB_TOKEN`) | +| `include-component-in-tag` | If true, add prefix to tags and branches, allowing multiple libraries to be released from the same repository | | `proxy-server` | Configure a proxy servier in the form of `:` e.g. `proxy-host.com:8080` | | `skip-github-release` | If `true`, do not attempt to create releases. This is useful if splitting release tagging from PR creation. | | `skip-github-pull-request` | If `true`, do not attempt to create release pull requests. This is useful if splitting release tagging from PR creation. | diff --git a/action.yml b/action.yml index cb35d8ba..eeb48a43 100644 --- a/action.yml +++ b/action.yml @@ -42,6 +42,9 @@ inputs: description: 'If true, send the PR from a fork. This requires the token to be a user that can create forks (e.g. not the default GITHUB_TOKEN)' required: false default: false + include-component-in-tag: + description: 'If true, add prefix to tags and branches, allowing multiple libraries to be released from the same repository' + required: false proxy-server: description: 'set proxy sever when you run this action behind a proxy. format is host:port e.g. proxy-host.com:8080' required: false diff --git a/dist/index.js b/dist/index.js index ecc8b6b2..8435b606 100644 --- a/dist/index.js +++ b/dist/index.js @@ -116242,6 +116242,7 @@ function parseInputs() { skipGitHubRelease: getOptionalBooleanInput('skip-github-release'), skipGitHubPullRequest: getOptionalBooleanInput('skip-github-pull-request'), fork: getOptionalBooleanInput('fork'), + includeComponentInTag: getOptionalBooleanInput('include-component-in-tag'), }; return inputs; } @@ -116260,6 +116261,7 @@ function loadOrBuildManifest(github, inputs) { core.debug('Building manifest from config'); return release_please_1.Manifest.fromConfig(github, github.repository.defaultBranch, { releaseType: inputs.releaseType, + includeComponentInTag: inputs.includeComponentInTag, }, { fork: inputs.fork, }, inputs.path); diff --git a/src/index.ts b/src/index.ts index 8f3975bc..549a9870 100644 --- a/src/index.ts +++ b/src/index.ts @@ -39,6 +39,7 @@ interface ActionInputs { skipGitHubRelease?: boolean; skipGitHubPullRequest?: boolean; fork?: boolean; + includeComponentInTag?: boolean; } // TODO: replace this interface is exported from release-please @@ -86,6 +87,7 @@ function parseInputs(): ActionInputs { skipGitHubRelease: getOptionalBooleanInput('skip-github-release'), skipGitHubPullRequest: getOptionalBooleanInput('skip-github-pull-request'), fork: getOptionalBooleanInput('fork'), + includeComponentInTag: getOptionalBooleanInput('include-component-in-tag'), }; return inputs; } @@ -113,6 +115,7 @@ function loadOrBuildManifest( github.repository.defaultBranch, { releaseType: inputs.releaseType, + includeComponentInTag: inputs.includeComponentInTag, }, { fork: inputs.fork,