ci: Fire publish workflows on prereleased events too#19
Merged
Conversation
The `release: types: [released]` trigger only matches when a GitHub release is published as non-prerelease. Creating a release with `--prerelease` (e.g. v2.0.0-beta.1) fires the separate `prereleased` event, so the publish workflows silently skipped and the artefacts had to be pushed via workflow_dispatch. Adding `prereleased` to the trigger list makes `gh release create <tag> --prerelease` publish to npm and Maven Central without a manual dispatch step. The npm dist-tag routing added in #18 already distinguishes pre-releases from stable versions, so this is safe.
nawforce
approved these changes
May 17, 2026
nawforce
approved these changes
May 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The
release: types: [released]trigger only fires for non-prerelease GitHub releases. Cuttingv2.0.0-beta.1withgh release create --prereleasetherefore fired the separateprereleasedevent, which neither workflow listened for — the publish had to be done viaworkflow_dispatchafter the fact.Change
Both
PublishMaven.ymlandPublishNPM.ymlnow listen for bothreleasedandprereleased:The npm dist-tag routing added in #18 already distinguishes pre-releases (
-in version) from stable versions, so this is safe — pre-releases continue to land under thebetadist-tag and won't clobberlatest.Test plan
gh release create <tag> --prereleasefires both publish workflows automatically (no manual dispatch required).Note:
apex-parser's workflows have the same gap. Worth a matching PR there before its first pre-release.