Upgrade version to 2.2.1 #20
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: Create Release | |
| on: | |
| push: | |
| tags: | |
| - "v*" # Push events to matching v*, i.e. v1.0, v20.15.10 | |
| permissions: | |
| contents: write | |
| actions: read | |
| jobs: | |
| release: | |
| name: Create a Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Download the repository code to the GitHub Actions runner | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| # Create a new GitHub release using the pushed tag | |
| # This will appear in the "Releases" section of the repository | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: Release ${{ github.ref_name }} | |
| draft: false | |
| prerelease: false | |
| publish: | |
| name: Publish Package to NPM Registry | |
| runs-on: ubuntu-latest | |
| needs: release | |
| steps: | |
| # Download the repository code to the GitHub Actions runner | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| # Install pnpm package manager which is used by this project | |
| # This ensures we use the same package manager as in development | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: "10.13.1" | |
| # Install Node.js runtime and configure NPM registry authentication | |
| # Cache pnpm dependencies to speed up future workflow runs | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22.17.1" | |
| registry-url: "https://registry.npmjs.org" | |
| cache: 'pnpm' | |
| # Install all project dependencies using pnpm | |
| - name: Install dependencies | |
| run: pnpm install | |
| # Build the package and prepare it for publishing | |
| # This runs the build script that builds the ESM/CJS versions and copies files | |
| - name: Build package for publishing | |
| run: pnpm run build | |
| # Publish the built package to NPM registry | |
| # Uses --access public for scoped packages and --no-git-checks for CI environment | |
| - name: Publish package to NPM registry | |
| run: pnpm publish dist --access public --no-git-checks | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |