Skip to content

Commit

Permalink
Merge pull request #18 from sdepold/master
Browse files Browse the repository at this point in the history
Additionally expose the release's ID
  • Loading branch information
neil-pozetroninc authored Dec 29, 2021
2 parents 1baec92 + aa12fcb commit 57753c3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ excludes | Exclude draft or pre-release versions. | "prerelease, draft"
Name | Description | Example
--- | --- | ---
release | The latest release version tag | v0.3.0
id | The latest release version id | 12345

Usage Example
=============
Expand Down
4 changes: 3 additions & 1 deletion action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ inputs:
required: false
outputs:
release:
description: 'Latest release'
description: 'Latest release name'
id:
description: 'Latest release ID'
runs:
using: 'node12'
main: 'main.js'
3 changes: 2 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ async function run() {
releases = releases.filter(x => x.draft != true);
}
if (releases.length) {
core.setOutput('release', releases[0].tag_name)
core.setOutput('release', releases[0].tag_name);
core.setOutput('id', String(releases[0].id));
} else {
core.setFailed("No valid releases");
}
Expand Down

0 comments on commit 57753c3

Please sign in to comment.