action-gh-release icon indicating copy to clipboard operation
action-gh-release copied to clipboard

release published trigger

Open tcurdt opened this issue 3 years ago • 5 comments

I want to trigger another workflow when the release has been published

on:
  release:
    types: [published]

Looking at the code I am not sure, but it looks like this might cause a race condition with the file upload.

Does the release maybe have to be drafted, files uploaded and then published for this to work? I could not find clear documentation on this.

tcurdt avatar Sep 18 '20 21:09 tcurdt

ATM I wish for a race condition :-D

Right now it's not triggering other workflows at all for me. Is that a known issue?

tcurdt avatar Sep 20 '20 15:09 tcurdt

It only triggers when the Personal Access Token is used instead of the standard Github Token.

tcurdt avatar Sep 21 '20 12:09 tcurdt

This might help someone

https://stackoverflow.com/a/60418414/9642772

TheBestMoshe avatar Oct 16 '20 01:10 TheBestMoshe

For anyone looking to trigger another workflow with release.published event:

  • Try to create a new Personal Access Token with just workflow permission
  • Then in your workflow:
- name: Release
        uses: softprops/action-gh-release@v1
        if: startsWith(github.ref, 'refs/tags/')
        with:
          token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}

minhdanh avatar Sep 18 '22 05:09 minhdanh

cause: https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow workaround sample: https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs

sensuikan1973 avatar Dec 04 '22 12:12 sensuikan1973