Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the release HTML URL to outputs #28

Merged
merged 1 commit into from
Oct 18, 2019

Conversation

csexton
Copy link
Contributor

@csexton csexton commented Oct 18, 2019

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}}

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}}
@softprops
Copy link
Owner

@csexton this is great! I had just this kind of thing in mind when thinking about outputs #9. I'll update the v1 tag to include this. Thanks for contributing!

@softprops softprops merged commit 56b4c8a into softprops:master Oct 18, 2019
@csexton
Copy link
Contributor Author

csexton commented Oct 18, 2019

Cool, I’ll was thinking about other outputs as well—but this was the one I needed now.

May have more changes incoming 😇

@softprops
Copy link
Owner

okay. updated the v1 tag to include this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants