Skip to content

ci: release automatically when a CHANGELOG version is merged - #30

Merged
rendis merged 1 commit into
mainfrom
issue/wonderful-fermi-8r8eid
Oct 5, 2026
Merged

rendis merged 1 commit into
mainfrom
issue/wonderful-fermi-8r8eid

Conversation

@rendis

@rendis rendis commented Oct 5, 2026 •

Copy link
Copy Markdown
Owner

Follow-up to #29. The integration used for automated maintenance cannot dispatch workflows: workflow_dispatch returns 403 "Resource not accessible by integration". So a release could not finish without someone pressing Run workflow. With this change, merging the release PR is enough.

Behavior on push to main

A prepare job reads the newest ## [X.Y.Z] section of CHANGELOG.md ([Unreleased] is ignored) and plans one of three actions:

State Action
vX.Y.Z tag missing Full release: quality checks, annotated tag on the merge commit, GitHub release from the CHANGELOG section, npm publish.
Tag exists, but the Studio package versions in main are missing from npm Quality checks + npm publish only.
Tag exists and the packages are on npm Nothing. The prepare job takes a few seconds and every other job is skipped.

Manual dispatch keeps the same inputs (version, target, dry_run) for previews and recovery. The later jobs now read the plan from prepare instead of the dispatch inputs.

Validation

  • actionlint reports no issues.
  • I ran the planning script locally against the real repository and npm registry:
    • Current main (v3.4.0 tagged, Studio 0.2.0 not on npm) plans target=npm.
    • A new ## [3.4.1] section without a tag plans target=all.
    • With package versions that are already on npm, it plans target=none.
  • CONTRIBUTING.md → Releasing now describes the merge-driven flow.

Note for merging

Merging this PR triggers the target=npm case for v3.4.0, which publishes @rendis/statepro-studio-react@0.2.0 and @rendis/statepro-studio-web-component@0.2.0. That only works once both packages have the npm Trusted Publisher configured (rendis / statepro / release.yml). Without it, the publish step fails with an authentication error and nothing is published.

The release workflow could only be started manually, and the integration
used for automated maintenance cannot dispatch workflows. Releasing now
happens on push to main: when the newest CHANGELOG version has no tag, the
workflow runs the full release (quality, tag, GitHub release, npm); when it
is tagged but its Studio package versions are missing from npm, it only
publishes them; otherwise it does nothing. Manual dispatch with dry_run is
kept for previews and recovery.
@rendis
rendis merged commit 9aeb34a into main Oct 5, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant