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

Commit

Permalink
fix: restore include-component-in-tag default (false) (#888)
Browse files Browse the repository at this point in the history
v3 had this option and must be configurable or at least set to `false`
so that the default behavior is to create a plain `v1.2.3` tag (without
the component name prefixed).

Found this while dogfooding our own usage of the action (in this repo).
  • Loading branch information
chingor13 committed Dec 1, 2023
1 parent eb6e951 commit 19431a1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<host>:<port>` 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. |
Expand Down
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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);
Expand Down
3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ interface ActionInputs {
skipGitHubRelease?: boolean;
skipGitHubPullRequest?: boolean;
fork?: boolean;
includeComponentInTag?: boolean;
}

// TODO: replace this interface is exported from release-please
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -113,6 +115,7 @@ function loadOrBuildManifest(
github.repository.defaultBranch,
{
releaseType: inputs.releaseType,
includeComponentInTag: inputs.includeComponentInTag,
},
{
fork: inputs.fork,
Expand Down

0 comments on commit 19431a1

Please sign in to comment.