Skip to content

Commit

Permalink
⚙️ Chore(github actions): change publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
INeedJobToStartWork committed Mar 4, 2024
1 parent 59a3646 commit d1090bd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
- 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 }}
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
//npm.pkg.github.com/:_authToken={{secrets.GITHUB_TOKEN}}
registry=https://npm.pkg.github.com

0 comments on commit d1090bd

Please sign in to comment.