Skip to content

ci: add CI, CodeQL and release automation - #18

Merged
GSTJ merged 7 commits into
masterfrom
gstj/ci-and-release-automation
Jul 26, 2026
Merged

ci: add CI, CodeQL and release automation#18
GSTJ merged 7 commits into
masterfrom
gstj/ci-and-release-automation

Conversation

@GSTJ

@GSTJ GSTJ commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Adds three workflows and moves releases onto release-it. This repo had no workflows, and 1.0.8 was released by hand.

Workflows

CI, on every PR and every push to master: lint, test, build, npm pack --dry-run. The pack step is here because this PR stops tracking build/.

CodeQL, on PRs, pushes to master and a weekly scan, following safe-jsx.

Release, on workflow_dispatch with an optional increment override. release-it reads the conventional commits since the last tag and derives the version bump, the CHANGELOG section, the annotated tag message and the GitHub release body from them. A ! or a BREAKING CHANGE: footer bumps the major and gets its own heading in the changelog, the tag and the release. I checked that path with a throwaway feat!: commit under --dry-run.

The trigger is manual because conventional-commits scores any commit as at least a patch, so pushing a README fix would ship a version.

NPM_TOKEN is set on the repo, same as safe-jsx and magic-modal.

Repo fixes

yarn lint was failing on master. eslint isn't in the lockfile, so it resolved to v10, which wants a flat config while the repo has .eslintrc.js. Pinned to 8: expo-module-scripts brings eslint-config-universe 12, and its @typescript-eslint/utils declares eslint@^7.0.0 || ^8.0.0.

build/ is no longer tracked. prepare regenerates it on every install, and a fresh expo-module build already rewrites 14 of the tracked files, so the committed copy was stale. A dirty tree after yarn install also aborts release-it. npm still gets the directory: it's in files, and prepare rebuilds it on publish and on git installs.

CHANGELOG.md stopped at 1.0.6, under @config-plugins/react-native-codepush, a name this package has never been published under. 1.0.7 and 1.0.8 are backfilled from git history, and the older entries now match the layout release-it writes.

Obsolescence

App Center's CodePush service shut down on 2025-03-31 and Microsoft archived react-native-code-push in May 2025. My read is keep the plugin:

  • The SDK it configures pulled between 233k and 264k downloads in each of the last five full months, with no downward trend.
  • This plugin only writes native config at prebuild. Point CodePushServerURL at any CodePush-protocol server and prebuild writes the same native config it always did.
  • The README already says the default endpoint is gone and points at self-hosting or expo-updates.

109 downloads last month is small, and if the SDK's numbers start dropping I'd revisit. Deprecating today would strand anyone running their own server.

First release off this is 1.0.9, driven by fix(deps): declare @babel/core (#16).

Proof

CI green on this branch, all steps including the new pack check:

CI run for this branch, every step green

Locally, from an empty node_modules: lint at zero warnings, 5 tests, a build, a 36-file tarball, and that tarball installed into a fresh project where the plugin registers all six mods.

Local run: install, lint, test, build, pack, consumer install

GSTJ added 4 commits July 26, 2026 20:21
`prepare` runs `expo-module build` on every install, so `build/` was already
being regenerated behind the tracked copy, which is a babel version behind
what the source compiles to now.

It also blocks release-it: every `yarn install` leaves the tree dirty, and a
dirty tree aborts a release.

npm still gets the directory. It's in `files`, and `prepare` rebuilds it on
publish and on git installs.
`yarn lint` has been broken because eslint isn't in the lockfile at all, so it
resolved to v10, which wants a flat config while the repo has `.eslintrc.js`.
expo-module-scripts pulls eslint-config-universe 12, and that one is built
against eslint 8.

release-it and @release-it/conventional-changelog are for the release
workflow.
The repo had no workflows at all, so nothing ran on a PR.

CI covers pushes to master and every PR: lint, test, build, then `npm pack
--dry-run` so an empty tarball fails the job now that `build/` is generated at
install time instead of committed.

CodeQL follows safe-jsx: PRs, pushes to master, and a weekly scan.
1.0.8 was bumped, tagged, released and published by hand, and CHANGELOG.md
stopped at 1.0.6 under `@config-plugins/react-native-codepush`, a name this
package has never been published under.

release-it now derives all of it from the conventional commits since the last
tag: the version bump, the CHANGELOG section, the annotated tag message and the
GitHub release body. A `!` or a `BREAKING CHANGE:` footer bumps the major and
shows up under the same `⚠ BREAKING CHANGES` heading in all three.

The trigger is `workflow_dispatch` with an optional increment override, not a
push to master. conventional-commits treats any commit as at least a patch, so
pushing a README fix would otherwise ship a version.

Backfilled 1.0.7 and 1.0.8 from git history and reshaped the older entries into
the layout release-it writes, so the file reads as one thing.
@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

GSTJ added 3 commits July 26, 2026 20:35
`yarn lint` didn't fail on eslint 8, it hung with no output, in CI and locally.

eslint-config-universe peer-requires `prettier >=3` and it was never installed.
eslint-plugin-prettier 5 loads prettier through a synckit worker, and with
nothing to load the worker never answers, so eslint blocks forever inside the
`prettier/prettier` rule. Nothing prints because the rule never returns.

With prettier 3.9.6 installed, `yarn lint` finishes in 4 seconds.
`eslint src --fix`. prettier 3 defaults `trailingComma` to `all` where 2
defaulted to `es5`, so almost all of this is commas. The indentation changes in
stringsDependency and infoPlistDependency come from #11 and #14, which were
written while lint was hanging.
universe sets most of its rules to `warn`, so `yarn lint` exits 0 no matter
what eslint reports. src is clean as of the commit before this one, so
`--max-warnings 0` starts from zero.
@GSTJ
GSTJ merged commit 09eeee1 into master Jul 26, 2026
3 checks passed
@GSTJ
GSTJ deleted the gstj/ci-and-release-automation branch July 26, 2026 23:52
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.

2 participants