diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 534f035..ed56b8d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,30 +1,21 @@ -name: Publish +name: Publish to NPM on: - push: - branches: - - "master" - -concurrency: ${{ github.workflow }}-${{ github.ref }} - + release: + types: [created] jobs: - publish: + build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: pnpm/action-setup@v2 + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Node + uses: actions/setup-node@v2 with: - version: 8 - - uses: actions/setup-node@v4 - with: - node-version: 18.x - cache: "pnpm" - - - run: pnpm install --frozen-lockfile - - name: Create Release Pull Request or Publish - id: changesets - uses: changesets/action@v1 - with: - publish: pnpm run release + node-version: '14.x' + registry-url: 'https://registry.npmjs.org' + - name: Install dependencies and build 🔧 + run: npm ci && npm run build + - name: Publish package on NPM 📦 + run: npm publish env: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/package.json b/package.json index d023a3f..e718f08 100644 --- a/package.json +++ b/package.json @@ -7,9 +7,6 @@ "wifikeys": "./dist/bin.js" }, "author": "FADHILI Josue ", - "files": [ - "./dist/bin.js" - ], "scripts": { "build": "esbuild --bundle src/bin.ts --platform=node --outfile=dist/bin.js --packages=external --format=esm --minify", "dev": "run-p dev:*",