diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..b1759c2 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,36 @@ +name: Release parallax-cli + +on: + workflow_dispatch: + +permissions: + id-token: write + contents: read + +jobs: + publish: + runs-on: ubuntu-latest + timeout-minutes: 20 + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 23.7.0 + cache: pnpm + registry-url: https://registry.npmjs.org + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Setup npm for trusted publishing + run: npm install -g npm@11.5.1 + + - name: Publish parallax-cli to npm + run: pnpm --dir packages/cli publish:package diff --git a/README.md b/README.md index 6d47be0..1e45c46 100644 --- a/README.md +++ b/README.md @@ -113,13 +113,20 @@ Parallax is published as a single global CLI package: npm i -g parallax-cli ``` -Release steps: +Releases are published through the manual GitHub Actions workflow: + +- open the `Release parallax-cli` workflow in GitHub Actions +- trigger it with `Run workflow` +- the workflow publishes the exact version already set in [`packages/cli/package.json`](packages/cli/package.json) + +Repository requirement: + +- configure npm trusted publishing for this repository/package in npm + +Before triggering the release, update the version in: ```bash -pnpm install -pnpm release:pack -# inspect packages/cli/parallax-cli-0.0.3.tgz, then: -pnpm release:publish +packages/cli/package.json ``` Then on Raspberry Pi / any machine: diff --git a/package.json b/package.json index 44b73d5..363f864 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "parallax", - "version": "0.0.3", + "version": "0.0.4", "private": true, "type": "module", "scripts": { diff --git a/packages/cli/package.json b/packages/cli/package.json index 63bb4a6..ba95f2a 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "parallax-cli", - "version": "0.0.3", + "version": "0.0.4", "type": "module", "bin": { "parallax": "dist/cli/src/index.js" diff --git a/packages/cli/scripts/prepare-package.mjs b/packages/cli/scripts/prepare-package.mjs index a6bbece..710b3da 100644 --- a/packages/cli/scripts/prepare-package.mjs +++ b/packages/cli/scripts/prepare-package.mjs @@ -17,7 +17,7 @@ const bundledPackages = [ sourceDir: path.join(workspaceRoot, 'packages/common'), packageJson: { name: '@parallax/common', - version: '0.0.3', + version: '0.0.4', type: 'module', main: './dist/index.js', types: './dist/index.d.ts', @@ -38,7 +38,7 @@ const bundledPackages = [ sourceDir: path.join(workspaceRoot, 'packages/orchestrator'), packageJson: { name: '@parallax/orchestrator', - version: '0.0.3', + version: '0.0.4', type: 'module', }, }, @@ -47,7 +47,7 @@ const bundledPackages = [ sourceDir: path.join(workspaceRoot, 'packages/ui'), packageJson: { name: '@parallax/ui', - version: '0.0.3', + version: '0.0.4', type: 'module', }, }, diff --git a/packages/common/package.json b/packages/common/package.json index 725d4ae..c1d28ad 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -1,6 +1,6 @@ { "name": "@parallax/common", - "version": "0.0.3", + "version": "0.0.4", "private": true, "type": "module", "main": "./dist/index.js", diff --git a/packages/marketing/package.json b/packages/marketing/package.json index 8b7523e..2dc10da 100644 --- a/packages/marketing/package.json +++ b/packages/marketing/package.json @@ -1,7 +1,7 @@ { "name": "@parallax/marketing", "private": true, - "version": "0.0.3", + "version": "0.0.4", "type": "module", "scripts": { "dev": "node ./scripts/sync-docs.mjs && vite", diff --git a/packages/orchestrator/package.json b/packages/orchestrator/package.json index b21b51f..2ef7357 100644 --- a/packages/orchestrator/package.json +++ b/packages/orchestrator/package.json @@ -1,6 +1,6 @@ { "name": "@parallax/orchestrator", - "version": "0.0.3", + "version": "0.0.4", "private": true, "type": "module", "scripts": { diff --git a/packages/ui/package.json b/packages/ui/package.json index 6947cdd..e6f9c9d 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -1,7 +1,7 @@ { "name": "@parallax/ui", "private": true, - "version": "0.0.3", + "version": "0.0.4", "type": "module", "scripts": { "dev": "vite",