diff --git a/.github/workflows/release-please.yaml b/.github/workflows/release-please.yaml index 2a2b8ff..d99e85e 100644 --- a/.github/workflows/release-please.yaml +++ b/.github/workflows/release-please.yaml @@ -17,3 +17,23 @@ jobs: with: release-type: node package-name: kycli + npm_publish: + name: Publish to npm + runs-on: ubuntu-latest + needs: [previous_job_name_if_any] + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '18' + registry-url: 'https://registry.npmjs.org' + - name: Install dependencies + run: | + npm ci + npm build + - name: Publish to npm + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/package.json b/package.json index a5173f7..78993b3 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "kycli": "./dist/index.js" }, "scripts": { - "build": "tsc && chmod +x ./dist/index.js && npm link", + "build-dev": "tsc && chmod +x ./dist/index.js && npm link", + "build": "tsc && chmod +x ./dist/index.js", "test": "echo \"Error: no test specified\" && exit 1", "start": "ts-node src/index.ts" },