Skip to content

ci: fix GitHub release creation on publish#22

Merged
devCluna merged 16 commits intoproductionfrom
main
Apr 10, 2026
Merged

ci: fix GitHub release creation on publish#22
devCluna merged 16 commits intoproductionfrom
main

Conversation

@devCluna
Copy link
Copy Markdown
Owner

@devCluna devCluna commented Apr 10, 2026

Summary

  • Add permissions: contents: write to the publish job so the workflow can create GitHub releases and tags
  • Pass token: ${{ secrets.GITHUB_TOKEN }} explicitly to softprops/action-gh-release@v2

Why

Without contents: write permission, the release step was silently failing — the npm publish succeeded but no GitHub release/tag was created.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Streamlined GitHub Actions workflow configuration to improve release pipeline reliability and efficiency.

devCluna and others added 13 commits April 3, 2026 21:05
Runs on every push and PR across all branches. Checks:
- TypeScript (server + admin)
- Build
- Strapi plugin verify
- Version not already published on npm
- Dry run publish

publish.yml now requires CI to pass before publishing to npm.
- Fix test:ts:front and test:ts:back scripts to use npx tsc (was yarn-only syntax)
- Add explicit types for implicit any parameters caught by the type check:
  MouseEvent on DropZone drag handle click
  boolean on Modal.Root onOpenChange in EmbedModal and FormPreview
  string | number on SingleSelect onChange in FieldSettingsPanel and SubmissionsPage
…gnore

Rollup was resolving register.js (and other compiled .js files) instead
of the .ts sources, causing 'default is not exported' build failures in CI.
Deleted all .js artifacts from server/src and admin/src and added them
to .gitignore so they are never committed again.
…tion

Without --noEmit, tsc outputs .js files next to the .ts sources.
Rollup then resolves the CJS .js files instead of the .ts sources and
fails with 'default is not exported' on the CommonJS interop boundary.
Push trigger now only fires on main, development and production.
Feature branches are covered by the pull_request trigger alone,
so CI no longer runs twice when pushing to an open PR.
- Version 1.0.0 (initial public release)
- Add description, keywords, repository, bugs and homepage fields
- Set strapi.displayName to 'Form Builder CMS'
Calling ci.yml as a reusable workflow while it also triggers independently
on push to production caused a workflow file error (0s failure).
Inlined all CI steps directly into publish.yml to avoid the conflict.
… release creation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 10, 2026

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 3dc71703-31e4-42e3-8d12-37f3fd883fb0

📥 Commits

Reviewing files that changed from the base of the PR and between 577f47b and 043006a.

📒 Files selected for processing (1)
  • .github/workflows/publish.yml

📝 Walkthrough

Walkthrough

Modified GitHub Actions workflow configuration by removing a redundant ci job reference and adding explicit token authentication to the release action step for the publish workflow.

Changes

Cohort / File(s) Summary
Workflow Configuration
.github/workflows/publish.yml
Removed reused ci job reference and added token: ${{ secrets.GITHUB_TOKEN }} parameter to the softprops/action-gh-release@v2 action step.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Poem

🐰 A token for safety, a job cleaned away,
The workflow now sparkles in GitHub's display,
No redundant runners, just auth shining bright,
Our releases secure through the digital night! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: fixing GitHub release creation in the publish workflow by adding necessary permissions and token configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch main

Comment @coderabbitai help to get the list of available commands and usage tips.

@devCluna devCluna merged commit 4de0cc5 into production Apr 10, 2026
3 of 4 checks passed
@devCluna devCluna deleted the main branch April 10, 2026 22:04
devCluna added a commit that referenced this pull request Apr 10, 2026
* ci: add CI workflow with type check, build, verify and dry-run publish

Runs on every push and PR across all branches. Checks:
- TypeScript (server + admin)
- Build
- Strapi plugin verify
- Version not already published on npm
- Dry run publish

publish.yml now requires CI to pass before publishing to npm.

* fix: replace yarn run -T with npx tsc and fix implicit any type errors

- Fix test:ts:front and test:ts:back scripts to use npx tsc (was yarn-only syntax)
- Add explicit types for implicit any parameters caught by the type check:
  MouseEvent on DropZone drag handle click
  boolean on Modal.Root onOpenChange in EmbedModal and FormPreview
  string | number on SingleSelect onChange in FieldSettingsPanel and SubmissionsPage

* ci: add Dependabot for npm and GitHub Actions weekly updates

* fix: remove stale compiled JS files from src and ignore them in .gitignore

Rollup was resolving register.js (and other compiled .js files) instead
of the .ts sources, causing 'default is not exported' build failures in CI.
Deleted all .js artifacts from server/src and admin/src and added them
to .gitignore so they are never committed again.

* fix: add --noEmit to tsc type-check scripts to prevent JS file generation

Without --noEmit, tsc outputs .js files next to the .ts sources.
Rollup then resolves the CJS .js files instead of the .ts sources and
fails with 'default is not exported' on the CommonJS interop boundary.

* ci: prevent double CI run on PR branches

Push trigger now only fires on main, development and production.
Feature branches are covered by the pull_request trigger alone,
so CI no longer runs twice when pushing to an open PR.

* chore: bump version to 1.0.0 and complete package.json metadata

- Version 1.0.0 (initial public release)
- Add description, keywords, repository, bugs and homepage fields
- Set strapi.displayName to 'Form Builder CMS'

* chore: set version to 1.0.0-alpha.1 and auto-tag alpha/beta/rc on publish

* ci: trigger publish on any push to production, not only PR merges

* ci: inline CI steps in publish workflow, remove reusable workflow call

Calling ci.yml as a reusable workflow while it also triggers independently
on push to production caused a workflow file error (0s failure).
Inlined all CI steps directly into publish.yml to avoid the conflict.

* fix: restore clean publish.yml — remove duplicate ci job from bad merge

* ci: add contents:write permission and explicit token to enable GitHub release creation

* chore: bump version to 1.0.0-alpha.2

* chore: bump version to 1.0.0-alpha.3

---------
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