diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 5d158dc..b0e50fe 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -15,7 +15,14 @@ jobs: with: node-version: '23.x.x' registry-url: 'https://registry.npmjs.org' - - run: npm ci - - run: npm publish + - run: npm run build + - name: Prepare dist + run: | + cd dist + npm ci + - name: Publish package + run: | + cd dist + npm publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/package.json b/package.json index 8ab2f9e..ff5159c 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "scripts": { "start": "node --env-file .env --watch src/app.js", "test": "NODE_ENV=test node --experimental-vm-modules --max-old-space-size=8192 node_modules/jest/bin/jest.js --runInBand", + "build": "mkdir -p dist && cp -r src/ dist/ && cp package.json dist/ && cp README.md dist/ && cp LICENSE dist/ && cp CHANGELOG.md dist/ && cd dist && npm i --omit=dev", "format": "prettier --write .", "check-format": "prettier -c .", "lint": "eslint ."