v1.13.2-rc.0 #50
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 | |
| on: | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| inputs: | |
| branch: | |
| description: Branch to publish from (defaults to main) | |
| required: false | |
| default: main | |
| permissions: | |
| id-token: write | |
| contents: read | |
| jobs: | |
| publish: | |
| if: contains('["knightedcodemonkey"]', github.actor) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Determine ref | |
| id: publish-ref | |
| run: | | |
| if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | |
| ref="${{ github.event.inputs.branch }}" | |
| if [ -z "$ref" ]; then | |
| ref="main" | |
| fi | |
| else | |
| ref="${{ github.ref }}" | |
| fi | |
| echo "ref=$ref" >> "$GITHUB_OUTPUT" | |
| - name: Checkout | |
| uses: actions/checkout@v6.0.1 | |
| with: | |
| ref: ${{ steps.publish-ref.outputs.ref }} | |
| - name: Setup Node | |
| uses: actions/setup-node@v6.2.0 | |
| with: | |
| node-version: '24.11.1' | |
| - name: Install Dependencies | |
| run: npm ci | |
| - name: Save error log | |
| uses: actions/upload-artifact@v6.0.0 | |
| if: ${{ failure() }} | |
| with: | |
| name: npm-debug-log-${{ hashFiles('package-lock.json') }} | |
| path: npm-debug.log | |
| - name: Check Types | |
| run: npm run check-types | |
| - name: Test | |
| run: npm test | |
| - name: Build | |
| run: npm run build | |
| - name: Pack | |
| run: npm pack | |
| - name: Publish to npm | |
| uses: JS-DevTools/npm-publish@v4.1.5 | |
| with: | |
| access: public | |
| tag: ${{ contains(github.ref, '-') && 'next' || 'latest' }} |