Compare commits

...

5 Commits

Author SHA1 Message Date
9a2319ecaf release prep 2019-10-20 18:15:51 -04:00
7363c39621 Merge pull request #26 from softprops/retry-api
retry api requests
2019-10-20 18:11:01 -04:00
742de9953a rebuild 2019-10-20 18:09:27 -04:00
56b4c8a8ef Merge pull request #28 from csexton/output-url
Add the release HTML URL to outputs
2019-10-18 10:15:52 -04:00
723bed634e Add the release HTML URL to outputs
This will allow subsequent actions to get access to the HTML URL for the
release created with this. Handy for composing multiple actions together
that are related to the release.

In my case I wanted to get the  URL into a slack message posted to the
team when a release is published.

The output can be referenced by using the `steps.release.ouput.url` in
the workflow yaml:

    - name: Release
      id: release
      uses: softprops/action-gh-release@v1
      with:
        name: "My Release"
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    - name: Slack
      uses: csexton/slack-message-action@v1
      with:
        message: New release posted at ${{ steps.release.outputs.url}}
2019-10-18 10:09:12 -04:00
4 changed files with 18 additions and 3 deletions

View File

@ -1,3 +1,8 @@
## 0.1.4
* Steps can now access the url of releases with the `url` output of this Action [#28](https://github.com/softprops/action-gh-release/pull/28)
* Added basic GitHub API retry support to manage API turbulance [#26](https://github.com/softprops/action-gh-release/pull/26)
## 0.1.3 ## 0.1.3
* Fixed where `with: body_path` was not being used in generated GitHub releases * Fixed where `with: body_path` was not being used in generated GitHub releases

View File

@ -77,7 +77,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
``` ```
### ⬆️ Uploading release assets ### ⬆️ Uploading release assets
You can can configure a number of options for your You can can configure a number of options for your
@ -188,6 +187,17 @@ The following are optional as `step.with` keys
💡When providing a `body` and `body_path` at the same time, `body_path` will be attempted first, then falling back on `body` if the path can not be read from. 💡When providing a `body` and `body_path` at the same time, `body_path` will be attempted first, then falling back on `body` if the path can not be read from.
#### outputs
The following outputs can be accessed via `${{ steps.<step-id>.outputs }}` from this action
| Name | Type | Description |
|-------------|---------|-----------------------------------------------------------------|
| `url` | String | Github.com URL for the release |
#### environment variables #### environment variables
The following are *required* as `step.env` keys The following are *required* as `step.env` keys

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "action-gh-release", "name": "action-gh-release",
"version": "0.1.3", "version": "0.1.4",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@ -1,6 +1,6 @@
{ {
"name": "action-gh-release", "name": "action-gh-release",
"version": "0.1.3", "version": "0.1.4",
"private": true, "private": true,
"description": "GitHub Action for creating GitHub Releases", "description": "GitHub Action for creating GitHub Releases",
"main": "lib/main.js", "main": "lib/main.js",