Trigger workflow after semantic-release

I have two workflows. The first workflow (Release) starts and ends with

on:
  push:
    branches:
      - main

[...]

      - name: Release
        run: yarn semantic-release

The second workflow (Build) starts with

on:
  push:
    branches:
      - main
    tags:
      - '*'

When I run git push on the main branch I would expect 1) the first and second workflow to run immediately and 2) the second workflow to run a second time after the first workflow has finished, because semantic-release pushes a new tag. But 2) never happens.

After some more research I found out that you need

  1. a different token than GITHUB_TOKEN to trigger workflows from workflows, documented by semantic-release/github;
  2. listen on a release event and not on a push event.

I can confirm that both changes make the entire workflow run correctly.

This is truly amazing, because I can now release my app with semantic-release and build a versioned container as per docker-publish.yml, which can then pulled by a Kubernetes cluster. Thank you, GitHub!