chore: release v2.0.11 #11
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
| # This action will publish the package to npm and create a GitHub release. | |
| name: Release | |
| on: | |
| # Run `npm run bump` to bump the version and create a git tag. | |
| push: | |
| tags: | |
| - "v*" | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| id-token: write | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.14.0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.20.0 | |
| registry-url: 'https://registry.npmjs.org' | |
| scope: '@winner-fed' | |
| always-auth: true | |
| - name: Update npm to latest | |
| run: npm install -g npm@latest | |
| - name: Install Dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build | |
| run: pnpm run build | |
| - name: Publish to npm | |
| run: npm publish --access public --provenance | |
| - name: Create GitHub Release | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| generateReleaseNotes: "true" | |
| - name: 通知发布成功 | |
| run: | | |
| PACKAGE_NAME=$(node -p "require('./package.json').name") | |
| echo "🎉 发布成功!" | |
| echo "📦 版本: ${{ steps.get_version.outputs.version }}" | |
| echo "🏷️ 标签: ${{ steps.get_version.outputs.tag_name }}" | |
| echo "📝 npm: https://www.npmjs.com/package/${PACKAGE_NAME}" |