Skip to content
This repository has been archived by the owner on Mar 4, 2021. It is now read-only.

Unexpected value for ${{ github.ref }} #36

Open
timbod7 opened this issue Mar 13, 2020 · 2 comments
Open

Unexpected value for ${{ github.ref }} #36

timbod7 opened this issue Mar 13, 2020 · 2 comments

Comments

@timbod7
Copy link

timbod7 commented Mar 13, 2020

I've using this action for the first time here:

https://github.com/timbod7/adl/blob/master/.github/workflows/release.yaml

I'm specifying an upload asset_path like: adl-bindist-${{ github.ref }}-osx.zip:

    - name: Upload macOS build
      uses: actions/upload-release-asset@v1.0.1
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        upload_url: ${{ steps.create_release.outputs.upload_url }}
        asset_path: dist-macOS/adl-bindist.zip
        asset_name: adl-bindist-${{ github.ref }}-osx.zip
        asset_content_type: application/zip

but this is not expanding as I expected. With a tag of v0.13 I expected an asset name of adl-bindist-v0.13-osx.zip, but instead see adl-bindist-refs.tags.v0.13-osx.zip. This is inconsistent with other rules in the same workflow, eg:

    - name: Create Release
      id: create_release
      uses: actions/create-release@v1.0.0
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        tag_name: ${{ github.ref }}
        release_name: Release ${{ github.ref }}
        draft: false
        prerelease: false

where release_name expands to "Release v0.13".

Is this behaviour expected?

@el7cosmos
Copy link

Yeah, how to achieve this like action/create-release properly?

@JostMigenda
Copy link

@el7cosmos If you still need this, see the discussion at https://github.saobby.my.eu.orgmunity/t/how-to-get-just-the-tag-name/16241 for a solution. (That’s also what OP has implemented.)

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

No branches or pull requests

3 participants