diff --git a/README.md b/README.md index 8a5da5d..68f42b3 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/dist/index.js b/dist/index.js index 0f482e7..0a98388 100644 --- a/dist/index.js +++ b/dist/index.js @@ -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() diff --git a/index.js b/index.js index 3e9ba44..9a2ad90 100644 --- a/index.js +++ b/index.js @@ -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()