Skip to content

Commit

Permalink
feat: bump behavior output
Browse files Browse the repository at this point in the history
  • Loading branch information
NGPixel committed Jan 22, 2024
1 parent 4024143 commit 2415a9e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,14 @@ jobs:

## Outputs

| Field | Description | Example Value |
|-------------------|---------------------------------------------|---------------|
| `current` | Current version number / latest tag. | `v1.1.9` |
| `next` | Next version number in format `v0.0.0` | `v1.2.0` |
| `nextStrict` | Next version number without the `v` prefix. | `1.2.0` |
| `nextMajor` | Next version major number in format `v0` | `v1` |
| `nextMajorStrict` | Next version major number only. | `1` |
| Field | Description | Example Value |
|-------------------|-------------------------------------------------------------|---------------|
| `current` | Current version number / latest tag. | `v1.1.9` |
| `next` | Next version number in format `v0.0.0` | `v1.2.0` |
| `nextStrict` | Next version number without the `v` prefix. | `1.2.0` |
| `nextMajor` | Next version major number in format `v0` | `v1` |
| `nextMajorStrict` | Next version major number only. | `1` |
| `bump` | Next version behavior: `major`, `major`, `major` or `none`. | `minor` |

## :warning: Important :warning:

Expand Down
2 changes: 2 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ outputs:
description: Next version major number in format v0
nextMajorStrict:
description: Next version major number only.
bump:
description: Next version behavior.
runs:
using: 'node20'
main: 'dist/index.js'
Expand Down
1 change: 1 addition & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53197,6 +53197,7 @@ async function main () {
}
}
core.info(`\n>>> Will bump version ${prefix}${latestTag.name} using ${bump.toUpperCase()}\n`)
core.setOutput('bump', bump || 'none')

// BUMP VERSION

Expand Down
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ async function main () {
}
}
core.info(`\n>>> Will bump version ${prefix}${latestTag.name} using ${bump.toUpperCase()}\n`)
core.setOutput('bump', bump || 'none')

// BUMP VERSION

Expand Down

0 comments on commit 2415a9e

Please sign in to comment.