Skip to content

Commit

Permalink
Add release name to output variable (#677)
Browse files Browse the repository at this point in the history
  • Loading branch information
robinraju authored Jan 27, 2024
1 parent 216d90d commit a3ec587
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ A Github Action to download assets from github release. It can download specifie
github-api-url: ""
```
#### Outputs variables
#### Output variables
- `tag_name` it outputs the tag used to download a release.

Expand All @@ -67,6 +67,12 @@ A Github Action to download assets from github release. It can download specifie
> ${{steps.<step-id>.outputs.tag_name}}
> ```

- `release_name` it outputs the name/title of the release
> It can ce used as follows
> ```
> ${{steps.<step-id>.outputs.release_name}}
>```

- `downloaded_files` it outputs an array of downloaded files

> It can be used as follows
Expand Down
2 changes: 2 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ inputs:
outputs:
tag_name:
description: "The github tag used to download the release"
release_name:
description: "The release name / title"
downloaded_files:
description: "The array of downloaded files, useful when using wildcard '*' to download multiple files."

Expand Down
1 change: 1 addition & 0 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/release-downloader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export class ReleaseDownloader {

// Set the output variables for use by other actions
core.setOutput("tag_name", ghRelease.tag_name)
core.setOutput("release_name", ghRelease.name)
core.setOutput("downloaded_files", result)

return result
Expand Down

0 comments on commit a3ec587

Please sign in to comment.