From 61fa7bb5838ca29fd81267cb12d5f79605d8994c Mon Sep 17 00:00:00 2001 From: default <142816307+bvu-front@users.noreply.github.com> Date: Fri, 9 Oct 2026 16:59:07 +0000 Subject: [PATCH 1/2] ci: mirror releases to GitHub Packages Each release is already published to npm. Also publish it to GitHub Packages so frontapp/front, whose .npmrc routes the whole @frontapp scope to npm.pkg.github.com, can install @frontapp/ui-kit as a normal semver dependency instead of mixing registries. This is the same arrangement front-ui-sdk uses for @frontapp/plugin-sdk (front-ui-sdk#94). The publish job gets packages: write via GITHUB_TOKEN; the workflow only runs on pushes to main, so pull requests never see it. Before the first release after this lands, 0.23.0 needs a one-time manual publish to https://npm.pkg.github.com so the registry has the current version. If the package was first published by a person, grant this repository write access under the package's "Manage Actions access" settings, or GITHUB_TOKEN will be refused. Co-Authored-By: Claude Sonnet 5.5 --- .github/workflows/build-and-publish.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index 8cccc978..9852d0dc 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -16,11 +16,14 @@ jobs: with: release-type: node - # Build and publish to NPM when a new version is released. + # Build and publish to NPM, then mirror to GitHub Packages, when a new version is released. build-and-publish: runs-on: ubuntu-latest needs: release-please if: needs.release-please.outputs.release-created + permissions: + contents: read + packages: write steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 @@ -33,6 +36,14 @@ jobs: - run: yarn publish --non-interactive --access public env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + # Mirror to GitHub Packages so frontapp/front can install @frontapp/ui-kit + # without mixing npm and GitHub Packages registries in CI. + - name: Publish to GitHub Packages + run: | + npm config set //npm.pkg.github.com/:_authToken "$GITHUB_PACKAGES_TOKEN" + npm publish --registry https://npm.pkg.github.com + env: + GITHUB_PACKAGES_TOKEN: ${{secrets.GITHUB_TOKEN}} # Build and publish storybook when a new version is released. storybook: From d0e82db6e00e79e93ac25474887718d5855811b9 Mon Sep 17 00:00:00 2001 From: default <142816307+bvu-front@users.noreply.github.com> Date: Tue, 13 Oct 2026 17:22:27 +0000 Subject: [PATCH 2/2] ci: publish the GitHub Packages mirror with yarn Use yarn for the mirror step like the rest of the job. The token goes in the user npmrc that setup-node already points yarn at, scoped to the npm.pkg.github.com host so the npm publish above is unaffected. Co-Authored-By: Claude Sonnet 5.5 --- .github/workflows/build-and-publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index 9852d0dc..6b64f266 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -40,8 +40,8 @@ jobs: # without mixing npm and GitHub Packages registries in CI. - name: Publish to GitHub Packages run: | - npm config set //npm.pkg.github.com/:_authToken "$GITHUB_PACKAGES_TOKEN" - npm publish --registry https://npm.pkg.github.com + echo "//npm.pkg.github.com/:_authToken=$GITHUB_PACKAGES_TOKEN" >> "$NPM_CONFIG_USERCONFIG" + yarn publish --non-interactive --access public --registry https://npm.pkg.github.com env: GITHUB_PACKAGES_TOKEN: ${{secrets.GITHUB_TOKEN}}