xresloader / upload-to-github-release

MIT License
52 stars 10 forks source link

If `tag_name` is set, `tags` is ignored. #58

Open aensidhe opened 7 months ago

aensidhe commented 7 months ago

Expected result: if there's no tag, then there's no upload. Actual: files are uploaded to newly created release.

Config:

    - name: Upload files to a GitHub release
      if: success() && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository)
      uses: xresloader/upload-to-github-release@v1.4.2
      with:
        file: ${{ env.NuGetDirectory }}\\*.nupkg
        tags: true
        overwrite: true
        tag_name: ${{ github.ref_name }}

Log from github action (full log]:

Run xresloader/upload-to-github-release@v1.4.2
  with:
    file: D:\a\MsgPack.Light\MsgPack.Light\nuget\\*.nupkg
    tags: true
    overwrite: true
    tag_name: master
    verbose: false
    update_latest_release: false
    token: ***
    find_draft_release_count: 32
  env:
    NuGetDirectory: D:\a\MsgPack.Light\MsgPack.Light\nuget
    DOTNET_ROOT: C:\Program Files\dotnet
File found to upload: D:/a/MsgPack.Light/MsgPack.Light/nuget/msgpack.light.2.0.1.1-gc7cb.nupkg
Try to get release by tag master from progaudi/MsgPack.Light
Try to get release by tag master from progaudi/MsgPack.Light : Not Found
Try to get draft release name master or tag name master from progaudi/MsgPack.Light
Try to create release master for progaudi/MsgPack.Light
Create release master for progaudi/MsgPack.Light success
Start uploading asset: D:/a/MsgPack.Light/MsgPack.Light/nuget/msgpack.light.2.0.1.1-gc7cb.nupkg(size: 98790) ...
Upload asset: msgpack.light.2.0.1.1-gc7cb.nupkg success
github-actions[bot] commented 4 months ago

This issue was marked as stale due to lack of activity.

owent commented 4 months ago

Why don't you do it by setting the job only triggered by tags?If you setting tag_name, we will try to create a tag if not found.