The complete open source platform to run your entire marketplace. Storefront, vendor panel, admin console, and integrations in one enterprise-grade platform you own.
TypeScript b2b-marketplacecomposable-commerceecommerceenterpriseheadless-commercemarketplacemedusamedusajsmulti-vendortypescript
chore: add canary release workflow and bump all packages to v2.0.0-canary.0
vholikabe2f671e031
diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlnew file mode 100644index 000000000..5985f0860--- /dev/null+++ b/.github/workflows/release.yml@@ -0,0 +1,48 @@+name: Canary Release++on:+ push:+ tags:+ - "v*"++permissions:+ contents: write+ id-token: write++jobs:+ release:+ runs-on: ubuntu-latest+ steps:+ - uses: actions/checkout@v4+ with:+ fetch-depth: 0++ - uses: oven-sh/setup-bun@v2++ - uses: actions/setup-node@v4+ with:+ node-version: "20"+ registry-url: "https://registry.npmjs.org"++ - run: npx changelogithub+ env:+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}++ - run: bun install --frozen-lockfile++ - name: Build+ run: bun run build++ - name: Publish to npm+ run: |+ for dir in packages/*/; do+ if [ -f "$dir/package.json" ] && ! grep -q '"private": true' "$dir/package.json"; then+ echo "Publishing $dir..."+ cd "$dir"+ npm publish --access public --no-git-checks --tag canary+ cd -+ fi+ done+ env:+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}+ NPM_CONFIG_PROVENANCE: truediff --git a/RELEASING.md b/RELEASING.mdnew file mode 100644index 000000000..eed9cc5b6--- /dev/null+++ b/RELEASING.md@@ -0,0 +1,60 @@+# Releasing++All packages are published under the `@mercurjs` scope with the `canary` npm tag.++## Published Packages++- `@mercurjs/cli`+- `@mercurjs/client`+- `@mercurjs/types`+- `@mercurjs/dashboard-sdk`+- `@mercurjs/dashboard-shared`+- `@mercurjs/core-plugin`+- `@mercurjs/vendor`++`@mercurjs/registry` is private and not published.++## How to Release++1. Bump the version in every package's `package.json`:++```+"version": "2.0.0-canary.X"+```++Where `X` is the next incremental number (0, 1, 2, ...).++2. Commit and tag:++```bash+git add -A+git commit -m "chore: v1.6.0-canary.X"+git tag v1.6.0-canary.X+git push origin <branch> --tags+```++3. The GitHub Action (`.github/workflows/release.yml`) triggers automatically and:+ - Generates a GitHub Release with changelog via `changelogithub`+ - Builds all packages with `bun run build` (Turborepo)+ - Publishes every non-private package to npm with `--tag canary`++## Installing Canary Packages++```bash+npm install @mercurjs/cli@canary+```++## Versioning Convention++```+v2.0.0-canary.0 # first canary+v2.0.0-canary.1 # second canary+v2.0.0-canary.2 # third canary+...+v2.0.0 # stable (when ready)+```++## Requirements++- `NPM_TOKEN` secret in GitHub repo settings (npm automation token)+- Use conventional commits (`feat:`, `fix:`, `chore:`) for changelog generationdiff --git a/packages/cli/package.json b/packages/cli/package.jsonindex 955823d4e..1842986dd 100644--- a/packages/cli/package.json+++ b/packages/cli/package.json@@ -1,6 +1,6 @@{"name": "@mercurjs/cli",- "version": "0.0.0",+ "version": "2.0.0-canary.0","type": "module","description": "Mercur CLI","author": "MercurJS (https://github.com/mercurjs)",diff --git a/packages/client/package.json b/packages/client/package.jsonindex 5c14354f7..bea38cdb1 100644--- a/packages/client/package.json+++ b/packages/client/package.json@@ -1,6 +1,6 @@{"name": "@mercurjs/client",- "version": "0.0.0",+ "version": "2.0.0-canary.0","type": "commonjs","author": "MercurJS (https://github.com/mercurjs)","license": "MIT",diff --git a/packages/core-plugin/package.json b/packages/core-plugin/package.jsonindex eb5b730d3..e983ab5f9 100644--- a/packages/core-plugin/package.json+++ b/packages/core-plugin/package.json@@ -1,6 +1,6 @@{"name": "@mercurjs/core-plugin",- "version": "0.0.1",+ "version": "2.0.0-canary.0","description": "Core plugin for MercurJS.","author": "Medusa (https://medusajs.com)","license": "MIT",diff --git a/packages/dashboard-sdk/package.json b/packages/dashboard-sdk/package.jsonindex 7bdfce3e2..fa968a230 100644--- a/packages/dashboard-sdk/package.json+++ b/packages/dashboard-sdk/package.json@@ -1,6 +1,6 @@{"name": "@mercurjs/dashboard-sdk",- "version": "0.0.1",+ "version": "2.0.0-canary.0","type": "module","main": "./dist/index.cjs","types": "./dist/index.d.ts",diff --git a/packages/dashboard-shared/package.json b/packages/dashboard-shared/package.jsonindex fa3b55f6a..e2dc56a9f 100644--- a/packages/dashboard-shared/package.json+++ b/packages/dashboard-shared/package.json@@ -1,6 +1,6 @@{"name": "@mercurjs/dashboard-shared",- "version": "0.0.1",+ "version": "2.0.0-canary.0","type": "module","main": "./dist/index.js","types": "./dist/index.d.ts",diff --git a/packages/types/package.json b/packages/types/package.jsonindex ea2e4b0e0..d86ce61d0 100644--- a/packages/types/package.json+++ b/packages/types/package.json@@ -1,6 +1,6 @@{"name": "@mercurjs/types",- "version": "0.0.1",+ "version": "2.0.0-canary.0","description": "Type definitions for Mercur","author": "Mercur","license": "MIT",diff --git a/packages/vendor/package.json b/packages/vendor/package.jsonindex cb60d2c95..43dcc8bdd 100644--- a/packages/vendor/package.json+++ b/packages/vendor/package.json@@ -1,6 +1,6 @@{"name": "@mercurjs/vendor",- "version": "0.0.1",+ "version": "2.0.0-canary.0","type": "module","main": "./dist/index.js","types": "./dist/index.d.ts",