Skip to content

Commit

Permalink
fix: set outputs in addition to vars
Browse files Browse the repository at this point in the history
  • Loading branch information
NGPixel committed Apr 1, 2022
1 parent ffe4a1b commit 65e1808
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,13 @@ 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` |
| 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` |

## :warning: Important :warning:

Expand Down
6 changes: 6 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29867,6 +29867,12 @@ async function main () {
core.exportVariable('current', latestTag.name)
core.exportVariable('next', `v${next}`)
core.exportVariable('nextStrict', next)

core.setOutput('current', latestTag.name)
core.setOutput('next', `v${next}`)
core.setOutput('nextStrict', next)
core.setOutput('nextMajor', `v${semver.major(next)}`)
core.setOutput('nextMajorStrict', semver.major(next))
}

main()
Expand Down
6 changes: 6 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,12 @@ async function main () {
core.exportVariable('current', latestTag.name)
core.exportVariable('next', `v${next}`)
core.exportVariable('nextStrict', next)

core.setOutput('current', latestTag.name)
core.setOutput('next', `v${next}`)
core.setOutput('nextStrict', next)
core.setOutput('nextMajor', `v${semver.major(next)}`)
core.setOutput('nextMajorStrict', semver.major(next))
}

main()

0 comments on commit 65e1808

Please sign in to comment.