rd-401 add options for error processing #23
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 experimental package | |
| on: | |
| pull_request: | |
| types: [opened, synchronize] | |
| jobs: | |
| publish-experimental: | |
| runs-on: ubuntu-latest | |
| if: | | |
| github.event.pull_request.head.repo.full_name == github.repository && | |
| ${{ github.head_ref != 'main' && !startsWith(github.head_ref, 'canary') }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "24" | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Install dependencies and build | |
| run: | | |
| pnpm install | |
| pnpm run build | |
| cp ../../README.md . | |
| cp ../../LICENSE . | |
| working-directory: ./packages/robindoc | |
| - name: Compute experimental version | |
| id: version | |
| run: | | |
| HASH=$(git rev-parse --short HEAD) | |
| echo "version=0.0.0-experimental-${HASH}" >> $GITHUB_OUTPUT | |
| - name: Publish experimental packages | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| run: | | |
| npm set //registry.npmjs.org/:_authToken=$NPM_TOKEN | |
| npm version --no-git-tag-version ${{ steps.version.outputs.version }} | |
| npm publish --tag experimental --access public | |
| working-directory: ./packages/robindoc |