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