Releases are tag-driven. Push a version tag and CI handles everything.
Steps:
- Create a version tag (must start with
v; release frommainor other branches; pick a version from: xgplayer versions and tags) - Push the tag to remote
- Wait for CI to complete the release
Stable release:
git tag v3.2.1
git push origin v3.2.1Prerelease:
git tag v3.2.1-rc.1
git push origin v3.2.1-rc.1- Stable tag (e.g.
v3.2.1): publishes to npm, creates a GitHub Release, and commits version changes back tomain - Prerelease tag (e.g.
v3.2.1-rc.1): publishes to npm, creates a GitHub Prerelease, and does not modifymain
GitHub Release notes are generated by CI. Stable releases compare against the latest previous stable tag (vX.Y.Z). Prereleases compare against the nearest previous version tag, including prerelease tags when available.
What's Changed is generated by the release workflow through GitHub's generateReleaseNotes API, not by parsing commit logs locally. It mainly lists merged pull requests in the selected compare range. Direct commits may only appear in Full Changelog; manually add them to the release body if they need to be called out.
Workflow file: .github/workflows/publish.yml
Trigger: push.tags: v*
Jobs:
build- Extracts the tag name
- Determines whether it is a stable release
- Sets the version and builds artifacts
release_npm- Downloads build artifacts
- Publishes to npm
release_github- Creates GitHub Release from the tag (as Prerelease for non-stable tags)
commit_to_main(stable only)- Applies version changes
- Commits and pushes to
main
release_summary- Reports the overall release status