From 85491119714b8f7213d9534cfcb407de07e02745 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=A9stor?= Date: Tue, 31 Mar 2026 15:18:24 +0200 Subject: [PATCH] fix: publish from package directory --- .github/workflows/publish-on-release.yml | 5 +++-- docs/RELEASING.md | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish-on-release.yml b/.github/workflows/publish-on-release.yml index fd6fb6e..f31e945 100644 --- a/.github/workflows/publish-on-release.yml +++ b/.github/workflows/publish-on-release.yml @@ -111,7 +111,7 @@ jobs: fi NEXT_VERSION="${BASE_VERSION}-next.${NEXT_NUMBER}" - npm pkg set version="$NEXT_VERSION" --workspace packages/astro + npm pkg set version="$NEXT_VERSION" --prefix packages/astro echo "Set prerelease version: $NEXT_VERSION" - name: Build package @@ -177,7 +177,8 @@ jobs: - name: Publish to npm if: steps.publish_action.outputs.action == 'publish' - run: npm publish --provenance --tag "${{ steps.dist.outputs.dist_tag }}" --access public --workspace packages/astro + working-directory: packages/astro + run: npm publish --provenance --tag "${{ steps.dist.outputs.dist_tag }}" --access public - name: Skip npm publish if: steps.publish_action.outputs.action == 'skip' diff --git a/docs/RELEASING.md b/docs/RELEASING.md index 7dd9e66..b1b5063 100644 --- a/docs/RELEASING.md +++ b/docs/RELEASING.md @@ -5,7 +5,7 @@ read_when: - Preparing a release - Wiring npm publish automation - Updating release pipeline behavior -updated_at: 2026-03-30 +updated_at: 2026-03-31 --- # Releasing @@ -28,7 +28,8 @@ This repo uses Changesets for versioning and publishes `@module-federation/astro - Release trigger: `latest` for stable releases, `next` for prereleases - Manual trigger (`workflow_dispatch`): `latest` or `next` - Pre-release versioning: - - On `prereleased` events, workflow patches `packages/astro/package.json` to `-next.` before publish. + - On `prereleased` events, workflow patches `packages/astro/package.json` to `-next.` before publish. + - npm publish runs from `packages/astro` directly; this repo uses `pnpm-workspace.yaml`, not root npm workspaces. - Existing version handling: - If the exact version already exists on npm and already has the target dist-tag, publish is skipped. - If the version exists but the target dist-tag points elsewhere, workflow fails.