I have github actions workflow which should be triggered on release creation
name: "Attach package to release assets"
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release
on:
release:
types: [published]
workflow_dispatch:
and another workflow which is responsible for release creation and should trigger this event (and workflow)
- name: Create release
uses: thomaseizinger/create-release@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
target_commitish: ${{ github.event.pull_request.merge_commit_sha }}
tag_name: ${{ env.RELEASE_VERSION }}
name: ${{ env.RELEASE_VERSION }}
body: ${{ steps.changelog_reader.outputs.changes }}
draft: false
prerelease: false
There is a release created on Github, so this action works properly. My question is how to debug events and see why first workflow is not invoked. I've tried already published
and released
without any effect.
As per official docs
For example, if a workflow run pushes code using the repository's GITHUB_TOKEN, a new workflow WILL NOT RUN even when the repository contains a workflow configured to run when push events occur.
See this link to create a custom token