Skip to content

Commit

Permalink
feat: Add appVersion output (#645)
Browse files Browse the repository at this point in the history
* feat: add `appVersion` output

* update
  • Loading branch information
A-kirami committed Dec 18, 2023
1 parent 508f95f commit d618a42
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changes/add-version-output.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
action: 'patch'
---

The action added `appVersion` parameter to facilitate easy access to the current application version in action output.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ These inputs allow you to modify the GitHub release.
| `releaseHtmlUrl` | The URL users can navigate to in order to view the created release |
| `releaseUploadUrl` | The URL for uploading assets to the created release |
| `artifactPaths` | The paths of the generated artifacts |
| `appVersion` | The version of the app |

## Caveats

Expand Down
2 changes: 2 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ outputs:
description: 'The URL for uploading assets to the created release'
artifactPaths:
description: 'The paths of the generated artifacts'
appVersion:
description: 'The version of the app'
runs:
using: 'node20'
main: 'dist/index.js'
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ async function run(): Promise<void> {
core.setOutput('releaseUploadUrl', releaseData.uploadUrl);
core.setOutput('releaseId', releaseData.id.toString());
core.setOutput('releaseHtmlUrl', releaseData.htmlUrl);
core.setOutput('appVersion', info.version);
}

if (releaseId) {
Expand Down

0 comments on commit d618a42

Please sign in to comment.