Skip to content

Commit

Permalink
Add publish input
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacome committed Apr 27, 2023
1 parent efc52f6 commit 72cd7ea
Show file tree
Hide file tree
Showing 9 changed files with 122 additions and 179 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jobs:
| `notes-header` | `string` | The header to use for the release notes. |
| `notes-footer` | `string` | The footer to use for the release notes. |
| `variables` | `list` | A list of variables to use in the header and footer. |
| `publish` | `boolean` | Whether to publish the release. (default `false`) |

## Outputs

Expand Down
2 changes: 2 additions & 0 deletions __tests__/notes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ describe('generateReleaseNotes', () => {
footer: 'footer with version {{version}} and baz {{baz}}',
variables: ['foo=bar', 'baz=qux'],
collapseAfter: 0,
publish: false,
}
const releaseData = {
releases: [],
Expand Down Expand Up @@ -117,6 +118,7 @@ describe('generateReleaseNotes', () => {
footer: 'footer with version {{version}}',
variables: [],
collapseAfter: 3,
publish: false,
}

const releaseData = {
Expand Down
1 change: 1 addition & 0 deletions __tests__/release.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ describe('createOrUpdateRelease', () => {
footer: 'footer',
variables: [],
collapseAfter: 0,
publish: false,
}
beforeEach(() => {
jest.clearAllMocks()
Expand Down
1 change: 1 addition & 0 deletions __tests__/version.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ describe('getVersionIncrease', () => {
footer: '',
variables: [],
collapseAfter: 0,
publish: false,
}

const releaseData = {
Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ inputs:
description: 'Number of lines required for the section to be collapsed'
default: '0'
required: false
publish:
description: 'Whether to publish the release'
default: 'false'
required: false
outputs:
version:
description: 'The version of the release'
Expand Down
Loading

0 comments on commit 72cd7ea

Please sign in to comment.