2.1.6-beta #35
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 to npmjs | |
| on: | |
| release: | |
| types: [published] | |
| jobs: | |
| build: | |
| permissions: | |
| id-token: write | |
| contents: read | |
| pull-requests: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '23.x' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Install pnpm | |
| run: npm install -g pnpm | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Build project | |
| run: pnpm run build | |
| - name: Publish to npm | |
| run: | | |
| if [ "${{ github.event.release.prerelease }}" == "true" ]; then | |
| echo "Publishing as beta (pre-release)..." | |
| pnpm publish --tag beta --access public --no-git-checks | |
| else | |
| echo "Publishing as normal release..." | |
| pnpm publish --access public --no-git-checks | |
| fi | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} |