Workflow not showing and not triggered by release

I have a workflow creating a release for me


  release:
    if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
    needs: [test]
    runs-on: ubuntu-latest
    steps:

      ...

      - name: Release
        uses: softprops/action-gh-release@v1
        with:
          files: |
            artifacts/*.tgz
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Now I have another workflow that should publish that release somewhere else.

on:
  release:
    types: [published]

jobs:
...

But this workflow does not get triggered.
It does not even show up under “actions > All Workflows”

What am I missing here?

Creating the release from the UI does trigger the workflow.

@tcurdt ,

According to the introduction from the docs about the GITHUB_TOKEN:

When you use the repository’s GITHUB_TOKEN to perform tasks on behalf of the GitHub Actions app, events triggered by the GITHUB_TOKEN will not create a new workflow run. This prevents you from accidentally creating recursive workflow runs.

Due to you are using the GITHUB_TOKEN to authenticate on the action to create the new release, the workflow can’t be triggered on the release event.

If you want the workflow can be triggered when creating a new release via the action, you need to create a personal access token (PAT) and set it as a secret in your repository. Then use this PAT to authenticate on the action. More details, see “Creating a personal access token”.


It does not even show up under “actions > All Workflows”

Generally, if the workflow file does not exist on the default or master branch, this workflow will not be automatically listed under “Actions > All workflows” unless this workflow has been triggered at least once.

When you use the repository’s GITHUB_TOKEN to perform tasks on behalf of the GitHub Actions app, events triggered by the GITHUB_TOKEN will not create a new workflow run. This prevents you from accidentally creating recursive workflow runs.

I wish this was linked from the docs about the triggers. I didn’t see it.
I wish the github team responsible would have used a different approach to prevent recursive workflows (if really deemed unacceptable).
I also wish the github team responsible would have though that this might cause problems and at least give an error message why the workflow wasn’t triggered.

Thank you so much for the pointer. I will give that a try today.

Generally, if the workflow file does not exist on the default or master branch, this workflow will not be automatically listed under “ Actions > All workflows ” unless this workflow has been triggered at least once.

It is on the master branch. So why doesn’t it show?

I have also added another workflow - that uses the same trigger. That one does show up.

Using the PAT all seems to be working. Thanks for the help.