Repository navigation
ci: release automatically when the version changes on main - #34
Merged
Merged
Conversation
The Publish workflow now runs on a push to main that changes the version of visual-editor/package.json: it refuses an existing tag or a version already on npm, runs the test workflow, creates the X.Y.Z tag, publishes with trusted publishing and provenance, then creates the GitHub release from the changelog section (the commits since the previous tag when it is missing). The file keeps its name, declared as the npm trusted publisher. A manual run on main releases the current version, a tag pushed by hand or a manual run on a tag stays the fallback. pnpm release:prepare <patch|minor|major|X.Y.Z> bumps the version and adds the changelog section, prefilled with the commits since the last tag.
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.
Releasing no longer needs a manual tag: a pull request that changes the version of
visual-editor/package.jsonis released when it is merged.On a push to
mainthat changes the version,publish.yml(same file name, still the npm trusted publisher):X.Y.Ztag exists or if the version is already on npm, and does nothing if the version did not change,test.yml(now alsoworkflow_call): type check, build, vitest, Cypress,GITHUB_TOKEN, so it does not start another run),npm publish --provenancein a job with the OIDC token and no dependency cache,Fallbacks kept: a manual run on
mainreleases the current version if it has no tag yet; a tag pushed by hand, or a manual run on a tag, publishes that tag (retry after a failure).pnpm release:prepare <patch|minor|major|X.Y.Z>bumps the version and adds the changelog section, prefilled with the commits since the last tag.CONTRIBUTING.mdandRELEASING.mddescribe the process.Checks: actionlint,
release:prepareandrelease:notesrun locally (existing section, missing section, invalid arguments). The workflow itself only runs after the merge.