Publish Package #95
Workflow file for this run
This file contains hidden or 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: Publish Package | |
| on: | |
| push: | |
| tags: | |
| - 'v*' # Push events to matching v*, i.e. v1.0, v20.16.0 | |
| - '@mango-scripts/**' # Push events to matching @mango-scripts*, i.e. @mango-scripts@react-scripts | |
| permissions: | |
| id-token: write # Required for OIDC | |
| contents: read | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9.6.0 | |
| - name: Set node version to 24.13.0 # 24以上版本的npm才支持OIDC | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24.13.0 | |
| registry-url: https://registry.npmjs.org/ | |
| cache: 'pnpm' | |
| - name: Install deps | |
| run: pnpm install | |
| - name: Publish package | |
| run: pnpm run release --tag ${{ github.ref_name }} |