CICD-010 · Handle published releases
Encyclopedia · Events and triggers · All snippets
Previous · CICD-009 · Next · CICD-011
1. Where it fits
- Placement .github/workflows/ci.yml, at workflow level, or within jobs for a named job mapping.
- Prerequisites workflow on an example repository with main as default.
- Platforms github-actions, gitea-actions.
2. Copy the snippet
yaml
on:
release:
types: [published]3. How it works
A release event describes a GitHub release, including its tag. Filter published to run once the release is available to consumers.
4. Verify the result
Observe github.event.release.tag_name from a published test release.
Watch for. Place event filters at workflow scope and test an event that should run and an event that should be skipped.
Validation syntax-validated (YAML parse). Status definitions.