Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Fix CLI npm publish for pre-release versions

Damian Legawieca986dc18aa8b
diff --git a/.github/workflows/packages.yml b/.github/workflows/packages.yml
index d1e8c914b9..b6effd58fb 100644
--- a/.github/workflows/packages.yml
+++ b/.github/workflows/packages.yml
@@ -168,9 +168,19 @@ jobs:
echo "published=false" >> $GITHUB_OUTPUT
fi
+ - name: Determine npm tag
+ id: tag
+ run: |
+ PACKAGE_VERSION=$(node -p "require('./package.json').version")
+ if echo "$PACKAGE_VERSION" | grep -qE '[-]'; then
+ echo "tag=beta" >> $GITHUB_OUTPUT
+ else
+ echo "tag=latest" >> $GITHUB_OUTPUT
+ fi
+
- name: Build and Publish
if: steps.check.outputs.published == 'false'
- run: pnpm build && npm publish --provenance --access public
+ run: pnpm build && npm publish --provenance --access public --tag ${{ steps.tag.outputs.tag }}
release-create-spree-app:
name: "create-spree-app - Release"