create-release icon indicating copy to clipboard operation
create-release copied to clipboard

Feature request: include tag_name in outputs

Open nrittsti opened this issue 4 years ago • 2 comments

Hi there,

i would like to include the release version in the 'Release Asset'. This requires the value of ${{ github.ref }} without the 'refs/tags/' prefix.

According to the API Documentation the version will be returned in the field tag_name.

${{ steps.create_release.outputs.tag_name }}

Currently outputs is limited to id, html_url and upload_url.

Example use case:



- name: Upload Release Asset
      id: upload-release-asset 
      uses: actions/[email protected]
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        upload_url: ${{ steps.create_release.outputs.upload_url }}        
        asset_path: ./build/distributions/myapp-${{ steps.create_release.outputs.tag_name }}-bin.zip
        asset_name: myapp-${{ steps.create_release.outputs.tag_name }}-bin.zip
        # example:  asset_name: myapp-v1.0.2-bin.zip    
        asset_content_type: application/zip

nrittsti avatar Nov 24 '19 18:11 nrittsti

Note this is being worked on here: https://github.com/actions/create-release/pull/10

IAmHughes avatar Nov 24 '19 19:11 IAmHughes

Any progress on this?

argenos avatar Aug 24 '20 20:08 argenos