diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..ae883af --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,32 @@ +name: Publish + +on: + push: + tags: ['v*.*.*'] + workflow_dispatch: + +jobs: + publish: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: + - uses: actions/checkout@v4 + - name: Install pnpm + uses: pnpm/action-setup@v4 + # Version intentionally omitted — resolved from the `packageManager` + # field in root package.json. Avoids the "Multiple versions of pnpm + # specified" error (see cluster-shared PR #6). + - uses: actions/setup-node@v4 + with: + node-version: '20' + registry-url: 'https://registry.npmjs.org' + cache: 'pnpm' + - run: pnpm install --frozen-lockfile + - run: pnpm -r build + - run: pnpm -r test + - name: Publish to npm (public) + run: pnpm -r --filter='!@sigops/vscode-ext' publish --access public --no-git-checks + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/packages/cli/package.json b/packages/cli/package.json index 2823e8f..beaa941 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,28 +1,36 @@ { - "name": "@sigops/cli", - "version": "0.1.0", - "description": "CLI for SigOps SDK - init, test, validate, publish tools and templates", + "name": "@sigops/dev-cli", + "version": "1.0.0", + "description": "Developer CLI for the SigOps SDK - init, test, validate, publish tools and templates", "type": "module", - "main": "./dist/index.cjs", + "main": "./dist/index.js", "module": "./dist/index.js", "types": "./dist/index.d.ts", "bin": { - "sigops": "./dist/index.js" + "sigops-dev": "./dist/index.js" }, "exports": { ".": { - "import": "./dist/index.js", - "require": "./dist/index.cjs", - "types": "./dist/index.d.ts" + "types": "./dist/index.d.ts", + "import": "./dist/index.js" } }, "files": ["dist"], + "repository": { + "type": "git", + "url": "https://github.com/diskhacker/sigops-sdk.git", + "directory": "packages/cli" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org", + "access": "public" + }, "scripts": { "build": "tsc --outDir dist --declaration", "test": "vitest run", "test:coverage": "vitest run --coverage", "lint": "tsc --noEmit" }, - "keywords": ["sigops", "cli"], + "keywords": ["sigops", "cli", "sdk"], "license": "MIT" } diff --git a/packages/plugin-sdk/package.json b/packages/plugin-sdk/package.json index de6c0bb..facffb3 100644 --- a/packages/plugin-sdk/package.json +++ b/packages/plugin-sdk/package.json @@ -1,19 +1,27 @@ { "name": "@sigops/plugin-sdk", - "version": "0.1.0", + "version": "1.0.0", "description": "Plugin SDK for building SigOps extensions and integrations", "type": "module", - "main": "./dist/index.cjs", + "main": "./dist/index.js", "module": "./dist/index.js", "types": "./dist/index.d.ts", "exports": { ".": { - "import": "./dist/index.js", - "require": "./dist/index.cjs", - "types": "./dist/index.d.ts" + "types": "./dist/index.d.ts", + "import": "./dist/index.js" } }, "files": ["dist"], + "repository": { + "type": "git", + "url": "https://github.com/diskhacker/sigops-sdk.git", + "directory": "packages/plugin-sdk" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org", + "access": "public" + }, "scripts": { "build": "tsc --outDir dist --declaration", "test": "vitest run", diff --git a/packages/sel-tools/package.json b/packages/sel-tools/package.json index c1f20d1..9e5b806 100644 --- a/packages/sel-tools/package.json +++ b/packages/sel-tools/package.json @@ -1,19 +1,27 @@ { "name": "@sigops/sel-tools", - "version": "0.1.0", + "version": "1.0.0", "description": "SEL parser, linter, formatter, and LSP for SigOps Expression Language", "type": "module", - "main": "./dist/index.cjs", + "main": "./dist/index.js", "module": "./dist/index.js", "types": "./dist/index.d.ts", "exports": { ".": { - "import": "./dist/index.js", - "require": "./dist/index.cjs", - "types": "./dist/index.d.ts" + "types": "./dist/index.d.ts", + "import": "./dist/index.js" } }, "files": ["dist"], + "repository": { + "type": "git", + "url": "https://github.com/diskhacker/sigops-sdk.git", + "directory": "packages/sel-tools" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org", + "access": "public" + }, "scripts": { "build": "tsc --outDir dist --declaration", "test": "vitest run", diff --git a/packages/template-sdk/package.json b/packages/template-sdk/package.json index 22f8821..93e7433 100644 --- a/packages/template-sdk/package.json +++ b/packages/template-sdk/package.json @@ -1,19 +1,27 @@ { "name": "@sigops/template-sdk", - "version": "0.1.0", + "version": "1.0.0", "description": "Template SDK for building SigOps automation templates", "type": "module", - "main": "./dist/index.cjs", + "main": "./dist/index.js", "module": "./dist/index.js", "types": "./dist/index.d.ts", "exports": { ".": { - "import": "./dist/index.js", - "require": "./dist/index.cjs", - "types": "./dist/index.d.ts" + "types": "./dist/index.d.ts", + "import": "./dist/index.js" } }, "files": ["dist"], + "repository": { + "type": "git", + "url": "https://github.com/diskhacker/sigops-sdk.git", + "directory": "packages/template-sdk" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org", + "access": "public" + }, "scripts": { "build": "tsc --outDir dist --declaration", "test": "vitest run", diff --git a/packages/tool-sdk/package.json b/packages/tool-sdk/package.json index 08907d8..59e12b8 100644 --- a/packages/tool-sdk/package.json +++ b/packages/tool-sdk/package.json @@ -1,19 +1,27 @@ { "name": "@sigops/tool-sdk", - "version": "0.1.0", + "version": "1.0.0", "description": "Tool SDK for building SigOps automation tools", "type": "module", - "main": "./dist/index.cjs", + "main": "./dist/index.js", "module": "./dist/index.js", "types": "./dist/index.d.ts", "exports": { ".": { - "import": "./dist/index.js", - "require": "./dist/index.cjs", - "types": "./dist/index.d.ts" + "types": "./dist/index.d.ts", + "import": "./dist/index.js" } }, "files": ["dist"], + "repository": { + "type": "git", + "url": "https://github.com/diskhacker/sigops-sdk.git", + "directory": "packages/tool-sdk" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org", + "access": "public" + }, "scripts": { "build": "tsc --outDir dist --declaration", "test": "vitest run", diff --git a/packages/vscode-ext/package.json b/packages/vscode-ext/package.json index 516f3c7..378dead 100644 --- a/packages/vscode-ext/package.json +++ b/packages/vscode-ext/package.json @@ -1,19 +1,24 @@ { "name": "@sigops/vscode-ext", - "version": "0.1.0", + "version": "1.0.0", "description": "VS Code extension for SigOps Expression Language (SEL)", "type": "module", - "main": "./dist/index.cjs", + "main": "./dist/index.js", "module": "./dist/index.js", "types": "./dist/index.d.ts", + "private": true, "exports": { ".": { - "import": "./dist/index.js", - "require": "./dist/index.cjs", - "types": "./dist/index.d.ts" + "types": "./dist/index.d.ts", + "import": "./dist/index.js" } }, "files": ["dist"], + "repository": { + "type": "git", + "url": "https://github.com/diskhacker/sigops-sdk.git", + "directory": "packages/vscode-ext" + }, "scripts": { "build": "tsc --outDir dist --declaration", "test": "vitest run",