-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
⚙️ Chore(github actions): change publish.yml
- Loading branch information
1 parent
59a3646
commit d1090bd
Showing
2 changed files
with
15 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |