From d1090bd55ed28a4cf553575cb598570183336376 Mon Sep 17 00:00:00 2001 From: ineedjobtostartwork Date: Mon, 4 Mar 2024 21:27:19 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9A=99=EF=B8=8F=20=20Chore(github=20actions)?= =?UTF-8?q?:=20change=20=20publish.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/publish.yml | 20 +++++++++++++------- .npmrc | 2 ++ 2 files changed, 15 insertions(+), 7 deletions(-) create mode 100644 .npmrc diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 378c8f3..ad7cb13 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -3,22 +3,28 @@ on: release: types: [created] jobs: - build: + release: + name: 📦 Publish to npm runs-on: ubuntu-latest permissions: contents: read id-token: write steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - name: 📚 Checkout + uses: actions/checkout@v3 + - name: 🟢 Setup node + uses: actions/setup-node@v3 with: node-version: "^20" registry-url: "https://registry.npmjs.org" - - name: Setup pnpm + - name: 🚀 Setup pnpm uses: pnpm/action-setup@v2.4.0 - - name: Install dependencies + - name: ↘️ Install dependencies run: pnpm install --no-frozen-lockfile - - run: pnpm build:npm - - run: cd ./dist && npm publish --provenance + - name: 🏗️ Build Package + run: pnpm build:npm + - name: 📦 Publish to npm + working-directory: ./dist + run: npm publish --access public --provenance env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..e972095 --- /dev/null +++ b/.npmrc @@ -0,0 +1,2 @@ +//npm.pkg.github.com/:_authToken={{secrets.GITHUB_TOKEN}} +registry=https://npm.pkg.github.com \ No newline at end of file