chore: 调整打包产物 #5
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
name: Public Packages | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
publish-npm: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup PNPM | |
uses: pnpm/action-setup@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
cache: pnpm | |
registry-url: https://registry.npmjs.org/ | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build Package | |
run: pnpm build | |
- name: Test Package | |
run: pnpm test | |
- name: Publish Package | |
run: pnpm release | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
- name: Push Tag | |
run: git push --follow-tags | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |