Skip to content

Add tag_name option#39

Merged
softprops merged 1 commit intosoftprops:masterfrom
k-takata:add-tag-name
Jan 9, 2020
Merged

Add tag_name option#39
softprops merged 1 commit intosoftprops:masterfrom
k-takata:add-tag-name

Conversation

@k-takata
Copy link
Contributor

@k-takata k-takata commented Jan 9, 2020

Allow setting tag name like actions/create-release.

I want to create a tag in a workflow and create a release for that tag. In that case, GITHUB_REF doesn't point to the tag.

Allow setting tag name like actions/create-release.
@softprops
Copy link
Owner

neat. This may actually solve for some of the related open issues in this repo. I should be able to publish a new release before the end of this weekend. I'll ping you in this thread when I do

@softprops softprops merged commit 9f4852e into softprops:master Jan 9, 2020
k-takata added a commit to k-takata/action-gh-release that referenced this pull request Jan 9, 2020
It should be `github.ref` or `GITHUB_REF`.
@k-takata k-takata mentioned this pull request Jan 9, 2020
softprops pushed a commit that referenced this pull request Jan 9, 2020
It should be `github.ref` or `GITHUB_REF`.
@gabriel-kohen-by
Copy link

I've just tried using it and for some reason it returns an error:
image

@k-takata
Copy link
Contributor Author

This is not included in @v0.1.5. You need to use @master for now.

@dvc94ch
Copy link

dvc94ch commented Jan 15, 2020

I'm getting this error:

Run softprops/action-gh-release@master
⚠️ Unexpected error fetching GitHub release for tag refs/tags/f-f001ea29f1b9664d928acfddbbd9c76a942e2238: HttpError: Validation Failed: {"resource":"Release","code":"already_exists","field":"tag_name"}
##[error]Validation Failed: {"resource":"Release","code":"already_exists","field":"tag_name"}
##[error]Node run failed with exit code 1

The situation I have is that I'm building multiple releases [stable, beta, dev] in a job, since the repo only contains build scripts. I suspect that you can only update the latest release. Has someone encountered this before?

- name: Upload release asset
      if: steps.release_check.outputs.skip_build != 'true' && github.event_name != 'pull_request'
      uses: softprops/action-gh-release@master
      env:
        GITHUB_TOKEN: ${{ secrets.PERMANENT_GITHUB_TOKEN }}
      with:
        tag_name: f-${{ steps.get_engine_version.outputs.engine_version }}
        name: Flutter ${{ steps.get_engine_version.outputs.engine_version }}
        files: ${{ matrix.config.host_tag }}-${{ matrix.config.tag }}.zip

maybe it was just a glitch in the matrix, having difficulties reproducing this reliably

@daltskin
Copy link

daltskin commented Jul 2, 2020

@dvc94ch I had this today:

##[error]Validation Failed: {"resource":"Release","code":"already_exists","field":"tag_name"}

(I'm also using matrixes) - but on when I ran it again it worked...

@dvc94ch
Copy link

dvc94ch commented Jul 2, 2020

I don't remember the solution, but I somehow got it to work or worked around it

aronchick pushed a commit to aronchick/action-gh-release that referenced this pull request Feb 19, 2026
Allow setting tag name like actions/create-release.
aronchick pushed a commit to aronchick/action-gh-release that referenced this pull request Feb 19, 2026
It should be `github.ref` or `GITHUB_REF`.
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.

5 participants