[EC3-2572] Publish react-codemirror to GitHub Packages#2
Merged
EshtiakAlam merged 3 commits intoJun 30, 2026
Merged
Conversation
- Scope package as @optimizely/react-codemirror, repoint repository to optimizely - Add publishConfig targeting npm.pkg.github.com - Add .npmignore to keep .github tooling out of the published tarball - Add release-triggered publish workflow (GITHUB_TOKEN, dry-run on dispatch)
There was a problem hiding this comment.
Pull request overview
This PR migrates publishing of @optimizely/react-codemirror from the prior Artifactory/jFrog setup to GitHub Packages by updating package metadata and adding a release-driven GitHub Actions publish workflow.
Changes:
- Updates
package.jsonto pointrepository.urlatoptimizely/react-codemirror, addspublishConfig.registry, and scopes the package name. - Adds
.npmignoreto exclude repository tooling (.github/) from the published tarball. - Adds a
publish.ymlworkflow to publish on GitHub Release (and dry-run onworkflow_dispatch) with tag/version guards.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| package.json | Adjusts npm package metadata for GitHub Packages publishing and repository association. |
| .npmignore | Excludes .github/ from npm package contents to keep the published payload clean. |
| .github/workflows/publish.yml | Adds automated release-based publishing to GitHub Packages (plus manual dry-run). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Set persist-credentials: false on actions/checkout so GITHUB_TOKEN is not written to .git/config (Arnica medium finding) - Drop redundant authenticated git fetch; fetch-depth: 0 already provides origin/master for the local merge-base check
- Replace hardcoded origin/master with github.event.repository.default_branch so the publish guard survives a default-branch rename (master -> main)
ahmedrafayat
approved these changes
Jun 30, 2026
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.
Description
Publishes
@optimizely/react-codemirrorto the GitHub Packages npm registry as part of the jFrog decommission (EC3-1515). The package was previously hosted on JFrog Artifactory; this migrates publishing to GitHub Packages with no version bump (stays1.0.1) and no source-logic changes.Two reference points to keep distinct:
package.jsoncarried the unscoped namereact-codemirror. This PR corrects it to the scoped@optimizely/react-codemirrorso it matches the name the package was already published under on jFrog, repointsrepository.url, and addspublishConfig.react-codemirror-1.0.1.tgz: the produced tarball is verified equivalent —lib/,dist/,src/,example/, README, LICENSE, etc.).package.jsondiffers only inrepository.url(repointed tooptimizely/react-codemirror, required so GH Packages links the package to this repo) and an addedpublishConfig(required to route the publish). The package name already matched jFrog (@optimizely/react-codemirror), so there is no name delta relative to the jFrog tarball — the name change is only relative to the repo base above.Type of change
Changelist
name(react-codemirror→@optimizely/react-codemirror) to match the prior jFrog-published name, repointrepository.urltooptimizely/react-codemirror, and addpublishConfig→npm.pkg.github.com..npmignoreso the.github/tooling is excluded from the published tarball (keeps payload byte-identical to jFrog).publish.ymlworkflow (mirrors theoptly-componentspattern): publishes viaGITHUB_TOKENon GitHub Release;workflow_dispatchruns a dry-run. Guards: tag format, tag reachable from the repo's default branch, andpackage.jsonversion matches the tag. No build/install step —lib/anddist/are committed, so it publishes the existing artifacts as-is.Test plan
workflow_dispatchand confirm the--dry-runpublish is green (packs the expected 14 files).v1.0.1and confirm@optimizely/react-codemirror@1.0.1appears on the GitHub Packages registry and installs in a downstream consumer.References
Jira Issues
EC3-2572