Skip to content

Commit

Permalink
feat: add upload-url to outputs (#84)
Browse files Browse the repository at this point in the history
* add upload-url to outputs

* Update action.yml

---------

Co-authored-by: Raymond Huang <[email protected]>
  • Loading branch information
mkorolyov and rymndhng authored Apr 7, 2023
1 parent 3cee24c commit aebba2b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ track what the last release version is. See [Release#get-the-latest-release](htt

### How can I get the generated tag or version?

On a successful release, this action creates an output parameters `tag_name` and `version`.
On a successful release, this action creates an output parameters `tag_name`, `upload_url` and `version`.

Example of how to consume this:

Expand All @@ -119,6 +119,7 @@ jobs:
run: |
echo "Got tag name ${{ steps.release.outputs.tag_name }}"
echo "Got release version ${{ steps.release.outputs.version }}"
echo "Upload release artifacts to ${{ steps.release.outputs.upload_url }}"
```

### Can I customize the release body message?
Expand Down
2 changes: 2 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ outputs:
description: 'Version of release'
body:
description: 'Github Release Body in Text'
upload_url:
description: 'Github Release Upload URL'
runs:
using: 'docker'
image: 'Dockerfile'
Expand Down
1 change: 1 addition & 0 deletions src/release_on_push_action/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@
(binding [*out* out]
(println (prepare-key-value "tag_name" (:tag_name release-data)))
(println (prepare-key-value "version" (:name release-data)))
(println (prepare-key-value "upload_url" (:upload_url release-data)))
(println (prepare-key-value "body" (:body release-data))))))

(defn -main [& args]
Expand Down

0 comments on commit aebba2b

Please sign in to comment.