fix(release): make publishing branch-protection safe - #30
Open
sozercan wants to merge 1 commit into
Open
Conversation
Signed-off-by: Sertac Ozercan <sozercan@gmail.com>
There was a problem hiding this comment.
Pull request overview
Introduces branch-protection-safe release automation using reviewed PRs and verified release artifacts.
Changes:
- Adds a workflow to prepare version-bump PRs.
- Publishes deterministic prereleases and proposes verified Artifact Hub metadata.
- Updates repository URLs and release documentation.
Verification: Author-reported checks were not independently rerun.
Show a summary per file
| File | Description |
|---|---|
README.md |
Clarifies Plugin Catalog filtering. |
CONTRIBUTING.md |
Documents the two-PR release process. |
artifacthub-pkg.yml |
Updates URLs, checksum, and prerelease metadata. |
.github/workflows/release.yaml |
Publishes, verifies, and proposes release metadata. |
.github/workflows/prepare-release.yaml |
Creates reviewed version-bump PRs. |
Review details
馃挕 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 5/5 changed files
- Comments generated: 3
- Review effort level: Balanced
| remote_branch="$(git ls-remote --heads origin "refs/heads/$RELEASE_BRANCH")" | ||
| if [ -n "$remote_branch" ]; then | ||
| git fetch origin "refs/heads/$RELEASE_BRANCH:refs/remotes/origin/$RELEASE_BRANCH" | ||
| if ! git diff --quiet "origin/$RELEASE_BRANCH" -- package.json package-lock.json; then |
Comment on lines
+139
to
+143
| if gh release view "$RELEASE_VERSION" --repo "$GITHUB_REPOSITORY" >/dev/null 2>&1; then | ||
| echo 'value=true' >> "$GITHUB_OUTPUT" | ||
| else | ||
| echo 'value=false' >> "$GITHUB_OUTPUT" | ||
| fi |
| remote_branch="$(git ls-remote --heads origin "refs/heads/$METADATA_BRANCH")" | ||
| if [ -n "$remote_branch" ]; then | ||
| git fetch origin "refs/heads/$METADATA_BRANCH:refs/remotes/origin/$METADATA_BRANCH" | ||
| if ! git diff --quiet "origin/$METADATA_BRANCH" -- artifacthub-pkg.yml; then |
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.
Summary
masterbranch and DCO checks remain enforcedWhy
The existing workflow commits release metadata directly to
master, which the current repository ruleset rejects. The retained 0.2.0 archive also contains package version 0.1.1, and Artifact Hub marks it as stable while GitHub marks it as a prerelease. These workflows make future releases fail closed on those mismatches.Validation
actionlint .github/workflows/*.yamlnpm run format -- --check(Node 22)npm run lint(Node 22)npm run tsc(Node 22)CI=true npm test(Node 22; 137 tests)make validate(Node 22)