Release Full #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: Release Full | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| type: choice | |
| description: "Release Npm Tag" | |
| required: true | |
| default: "latest" | |
| options: | |
| - canary | |
| - nightly | |
| - latest | |
| - beta | |
| - alpha | |
| dry_run: | |
| type: boolean | |
| description: "DryRun release" | |
| required: true | |
| default: false | |
| permissions: | |
| contents: write | |
| # To publish packages with provenance | |
| id-token: write | |
| jobs: | |
| release: | |
| name: Release | |
| environment: npm | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Pnpm | |
| run: npm i -g corepack@latest --force && corepack enable | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: "pnpm" | |
| # Update npm to the latest version to enable OIDC | |
| - name: Update npm | |
| run: | | |
| npm install -g npm@latest | |
| npm --version | |
| - name: Install Dependencies | |
| run: pnpm install | |
| - name: Run Test | |
| run: pnpm run test | |
| - name: Dry run release to npm | |
| if: inputs.dry_run | |
| run: node scripts/release.js --dry-run --tag ${{ github.event.inputs.tag }} | |
| - name: Release to npm | |
| if: ${{ !inputs.dry_run }} | |
| run: node scripts/release.js --tag ${{ github.event.inputs.tag }} |