Skip to content

[FSSDK-12882] release pipeline update#343

Open
junaed-optimizely wants to merge 2 commits into
masterfrom
junaed/fssdk-12882-ghr-publish-adjustment
Open

[FSSDK-12882] release pipeline update#343
junaed-optimizely wants to merge 2 commits into
masterfrom
junaed/fssdk-12882-ghr-publish-adjustment

Conversation

@junaed-optimizely

Copy link
Copy Markdown
Collaborator

Summary

This pull request introduces significant improvements to the release and publishing workflow for the @optimizely/react-sdk package. It adds a new, idempotent script for publishing to both npm and GitHub Package Registry (GHR), splits the release workflow into separate jobs for npm and GHR, and provides a manual workflow to backfill historical versions to GHR. These changes ensure consistent, safe, and repeatable publishing across registries, and make it easy to synchronize GHR with npm.

Release workflow improvements:

  • The release workflow (.github/workflows/react_release.yml) is refactored to split publishing into two jobs: one for npm and one for GitHub Package Registry, both using a shared publish script for consistent behavior. [1] [2]

New publish script:

  • A new script scripts/publish.sh is added, which is registry-agnostic, idempotent, and automatically computes the correct npm dist-tag (latest, beta, alpha, rc) based on the version string. It skips publishing if the version already exists and supports dry runs.

Backfill workflow:

  • A new manual workflow (.github/workflows/ghr_backfill.yml) is introduced to backfill all missing or specific versions from npm to GHR, ensuring the GHR registry mirrors npm exactly and safely.

These changes make the release process more robust, automate version/tag handling, and simplify maintenance of both npm and GHR registries.

Test plan

Existing tests should pass

Issues

  • FSSDK-12882

Comment thread .github/workflows/ghr_backfill.yml
Comment thread .github/workflows/ghr_backfill.yml

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the @optimizely/react-sdk release tooling to make publishing repeatable across both npm and GitHub Package Registry (GHR) by introducing a shared, idempotent publish script, splitting the release workflow into separate npm/GHR jobs, and adding a manual backfill workflow for populating historical versions into GHR from npm tarballs.

Changes:

  • Added scripts/publish.sh to publish idempotently to a specified registry and compute the correct dist-tag from the version.
  • Refactored the release workflow to publish to npm and GHR in separate jobs using the shared publish script.
  • Added a manual backfill workflow to republish npm tarballs into GHR (with optional dry-run).

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
scripts/publish.sh New registry-agnostic publish helper with version-exists guard and dist-tag selection.
.github/workflows/react_release.yml Splits release publishing into npm and GHR jobs, both calling the shared publish script.
.github/workflows/ghr_backfill.yml Adds manual workflow to backfill versions from npm into GHR using packed tarballs and the publish script.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/ghr_backfill.yml
Comment thread scripts/publish.sh Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

Comment on lines +40 to +42
- name: Checkout branch
uses: actions/checkout@v4


for v in $versions; do
echo "::group::${pkg}@${v}"
tarball=$(npm pack "${pkg}@${v}" --registry https://registry.npmjs.org 2>/dev/null | tail -n1)
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