diff --git a/.github/workflows/main-merge.yml b/.github/workflows/main-merge.yml index 5a7d0e8..05f5185 100644 --- a/.github/workflows/main-merge.yml +++ b/.github/workflows/main-merge.yml @@ -49,13 +49,11 @@ jobs: with: node-version: "20" cache: "pnpm" - - name: Pack the package - run: pnpm pack - - name: Publish tarball to npm 🚀 - shell: bash - run: |- - cat package.json | - jq '.version' | - xargs -I {} pnpm publish zod-to-dynamodb-onetable-schema-{}.tgz --access public --no-git-checks - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + - name: Install packages + run: pnpm install + - name: Run build command + run: pnpm build + - name: Publish to npm 🚀 + uses: JS-DevTools/npm-publish@v3 + with: + token: ${{ secrets.NPM_TOKEN }} diff --git a/package.json b/package.json index e6119e9..0149167 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "zod-to-dynamodb-onetable-schema", - "version": "0.0.1", + "version": "0.0.2", "description": "Auto-generate `dynamodb-onetable` model schemas using `zod`, with best-in-class autocomplete", "keywords": [ "dynamo", @@ -18,15 +18,14 @@ "bugs": { "url": "httckaps://github.com/jharlow/zod-to-dynamodb-onetable-schema/issues" }, - "main": "index.ts", + "exports": "./lib/index.js", + "types": "./lib/index.d.ts", "files": [ "lib", "README.md", "package.json" ], "type": "module", - "exports": "./lib/index.js", - "types": "./lib/index.d.ts", "scripts": { "build": "tsc", "clean": "tsc --build --clean && rm -rf lib",