diff --git a/.github/workflows/cd-docker-release.yaml b/.github/workflows/cd-docker-release.yaml index 2430f36d..a859a482 100644 --- a/.github/workflows/cd-docker-release.yaml +++ b/.github/workflows/cd-docker-release.yaml @@ -7,11 +7,30 @@ on: workflow_dispatch: inputs: + release_version: description: 'Release version (no v prefix)' required: true default: '0.0.0' + publish_lib: + description: 'Publish lib to npm' + required: true + type: boolean + default: true + + publish_cli: + description: 'Publish CLI to npm' + required: true + type: boolean + default: true + + release_docker: + description: 'Release Docker images' + required: true + type: boolean + default: true + permissions: contents: read packages: write @@ -19,7 +38,11 @@ permissions: jobs: publish-lib: name: Publish lib to npm + if: ${{ github.event.inputs.publish_lib || github.event_name == 'push' }} runs-on: ubuntu-latest + permissions: + contents: read + id-token: write defaults: run: working-directory: packages/lib @@ -32,20 +55,25 @@ jobs: node-version: 22 corepack: true cache: 'pnpm' + registry-url: 'https://registry.npmjs.org' - name: Install dependencies run: pnpm i working-directory: ./ - name: Publish lib to npm - run: pnpm publish --access public + run: pnpm publish --access public --no-git-checks env: NPM_CONFIG_PROVENANCE: true NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} publish-cli: name: Publish CLI to npm + if: ${{ github.event.inputs.publish_cli || github.event_name == 'push' }} runs-on: ubuntu-latest + permissions: + contents: read + id-token: write defaults: run: working-directory: packages/cli @@ -58,19 +86,21 @@ jobs: node-version: 22 corepack: true cache: 'pnpm' + registry-url: 'https://registry.npmjs.org' - name: Install dependencies run: pnpm i working-directory: ./ - name: Publish lib to npm - run: pnpm publish --access public + run: pnpm publish --access public --no-git-checks env: NPM_CONFIG_PROVENANCE: true NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} docker-release: name: Release Docker images + if: ${{ github.event.inputs.release_docker || github.event_name == 'push'}} runs-on: ubuntu-latest steps: - name: Get release version from tag diff --git a/package.json b/package.json index 31fcc604..0e7ce3fd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@enclosed/root", - "version": "0.0.0", + "version": "1.5.0", "description": "Send private and secure note", "packageManager": "pnpm@9.10.0", "license": "Apache-2.0", diff --git a/packages/app-client/package.json b/packages/app-client/package.json index 8d5db60b..c605d04e 100644 --- a/packages/app-client/package.json +++ b/packages/app-client/package.json @@ -1,7 +1,7 @@ { "name": "@enclosed/app-client", "type": "module", - "version": "0.0.0", + "version": "1.5.0", "packageManager": "pnpm@9.10.0", "description": "Enclosed frontend client", "author": "Corentin Thomasset (https://corentin.tech)", diff --git a/packages/app-server/package.json b/packages/app-server/package.json index f6481299..30a0ea63 100644 --- a/packages/app-server/package.json +++ b/packages/app-server/package.json @@ -1,7 +1,7 @@ { "name": "@enclosed/app-server", "type": "module", - "version": "0.0.0", + "version": "1.5.0", "packageManager": "pnpm@9.10.0", "description": "Enclosed backend server", "author": "Corentin Thomasset (https://corentin.tech)", diff --git a/packages/cli/package.json b/packages/cli/package.json index 87b8060d..664e2b55 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,7 +1,7 @@ { "name": "@enclosed/cli", "type": "module", - "version": "0.0.4", + "version": "1.5.0", "packageManager": "pnpm@9.10.0", "description": "Enclosed cli to create secure notes.", "author": "Corentin Thomasset (https://corentin.tech)", diff --git a/packages/deploy-cloudflare/package.json b/packages/deploy-cloudflare/package.json index 82fb23f3..27fe7d46 100644 --- a/packages/deploy-cloudflare/package.json +++ b/packages/deploy-cloudflare/package.json @@ -1,6 +1,6 @@ { "name": "@enclosed/deploy-cloudflare", - "version": "0.0.0", + "version": "1.5.0", "description": "Deploy scripts for Cloudflare Pages", "packageManager": "pnpm@9.10.0", "license": "Apache-2.0", diff --git a/packages/docs/package.json b/packages/docs/package.json index c418efa1..fc440f3c 100644 --- a/packages/docs/package.json +++ b/packages/docs/package.json @@ -1,6 +1,6 @@ { "name": "@enclosed/docs", - "version": "0.0.0", + "version": "1.5.0", "type": "module", "packageManager": "pnpm@9.10.0", "description": "Documentation website for Enclosed.", diff --git a/packages/lib/package.json b/packages/lib/package.json index 6251f013..e9b1fe55 100644 --- a/packages/lib/package.json +++ b/packages/lib/package.json @@ -1,7 +1,7 @@ { "name": "@enclosed/lib", "type": "module", - "version": "0.1.0", + "version": "1.5.0", "packageManager": "pnpm@9.10.0", "description": "Enclosed lib to create secure notes.", "author": "Corentin Thomasset (https://corentin.tech)",