Skip to content

v1.0.0-rc.2

v1.0.0-rc.2 #4

Workflow file for this run

name: Publish
on:
release:
types:
- published
workflow_dispatch:
inputs:
dry_run:
description: Run all checks without publishing to npm.
type: boolean
default: true
permissions:
contents: read
id-token: write
env:
BUN_VERSION: "1.3.0"
NODE_VERSION: "20.19.0"
jobs:
npm:
name: npm
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: ${{ env.BUN_VERSION }}
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: https://registry.npmjs.org
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Lint
run: bun run lint
- name: Typecheck
run: bun run typecheck
- name: Test
run: bun test
- name: Validate generated projects
run: bun run validate
- name: Build
run: bun run build
- name: Check package contents
run: bun run pack:check
- name: Smoke test packed package
run: bun run pack:smoke
- name: Publish to npm
if: github.event_name == 'release' || inputs.dry_run == false
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish --provenance --access public
- name: Skip publish
if: github.event_name == 'workflow_dispatch' && inputs.dry_run
run: echo "Dry run completed; no package was published."