question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

feat: add GutHub action outputs

See original GitHub issue

Description

Current GitHub action has some inputs, then it does something, but it has not usable outputs to check what the results were. As a user of the GitHub action, i want several outputs, so that i can use them programmatically in GitHub workflows.

  • released: bool(-ish) value that indicates whether a released happened
  • version: (new) semantic version that was calculated. if released was false than this would be the current version detected.
  • tag: VCS tag-name was used for the release. if released was false than this would be empty string.
  • url: Github.com URL for the release. if released is false, then this value is empty string
  • id: Release ID. if released is false, then this value is null
  • assets: JSON array containing information about each uploaded asset, in the format given here (minus the uploader field). if released is false, then this value is an empty JSON list
  • assets-dist: JSON object containing information about each uploaded dist asset, in the format given here (minus the uploader field). if released is false, then this value is an empty JSON object
  • upload_url: URL for uploading assets to the release. if released is false, then this value is an empty string

output inspired by https://github.com/softprops/action-gh-release

Use cases

  • released: python-semantic-release GitHub action might detect that no release should happen. To indicate this, you can check this value. As an example, you can use ${{ steps.<step-id>.outputs.released }} to check if a release happened and control other steps based on that information. For example a DockerHub release can be skipped, if python-semantic-release did not happen, although the github-action ended with success() state.
  • version: As an example, you can use ${{ steps.<step-id>.outputs.version }} to get the version that was currently detected/used for the release.
  • tag: As an example, you can use ${{ steps.<step-id>.outputs.tag }} as an input for https://github.com/marketplace/actions/upload-files-to-a-github-release
  • assets: As an example, you can use ${{ fromJSON(steps.<step-id>.outputs.assets-dist)[0].browser_download_url }} to get the download URL of the first asset. This file can then be downloaded an put in a docker image.
  • asset-dist: As an example, you can use ${{ fromJSON(steps.<step-id>.outputs.assets-dist).wheel.browser_download_url }} to get the download URL of the wheel-dist asset. This file can then be downloaded an put in a docker image.
  • upload_url: As an example, you can use ${{ steps.<step-id>.outputs.upload_url }} as an input for https://github.com/actions/upload-release-asset

Possible implementation

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
github-actions[bot]commented, Nov 13, 2022

This feature request has been labelled as help wanted since there has been no activity in the last 3 weeks. It will not be closed.

1reaction
github-actions[bot]commented, Feb 6, 2022

This feature request has been labelled as help wanted since there has been no activity in the last 3 weeks. It will not be closed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

google-github-actions/release-please-action
Add this Action to an existing workflow or create a new one. ... steps.release.outputs.minor }} || true git push origin :v${{ steps.release.outputs.major ...
Read more >
feat: Add outputs.skipped #169 - peaceiris/actions-gh-pages
feat : Add outputs.skipped #169. Draft. peaceiris wants to merge 1 commit into main.
Read more >
release-please-action - GitHub Marketplace
Reference Release types supported; new types of releases can be added here ... Outputs. Properties that are available after the action executed.
Read more >
[Feature] implement an outputs for matrix compatible jobs #530
Implement a outputs.all_changed_files_json or similar that can be used with toJSON and fromJSON to pass the outputs on to a matrix. Thanks!
Read more >
feat(release-please): add support for ocaml (#189) - GitHub
Contribute to google-github-actions/release-please-action development by creating an ... git push origin :v${{ steps.release.outputs.major }} || true.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found