Skip to content

Commit

Permalink
chore(projects): github workflow add publish npm
Browse files Browse the repository at this point in the history
  • Loading branch information
honghuangdc committed Nov 5, 2023
1 parent 5fa75fc commit 3695b32
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,28 @@ jobs:
with:
fetch-depth: 0

- uses: actions/setup-node@v3
- name: Install pnpm
uses: pnpm/action-setup@v2

- name: Set node
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: lts/*
cache: pnpm
registry-url: "https://registry.npmjs.org"

- run: npx githublogen
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Install Dependencies
run: pnpm i

- name: PNPM build
run: pnpm run build

- name: Publish to NPM
run: pnpm -r publish --access public --no-git-checks
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
NPM_CONFIG_PROVENANCE: true
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"cleanup": "soy cleanup",
"update-pkg": "soy ncu",
"publish-pkg": "pnpm -r publish --access public",
"release": "pnpm soy release && pnpm build && pnpm publish-pkg",
"release": "pnpm soy release",
"prepare": "pnpm -r run stub"
},
"devDependencies": {
Expand Down

0 comments on commit 3695b32

Please sign in to comment.