Release Package #61
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 Package | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| dry_run: | |
| description: 'Dry run (skip actual publish)' | |
| required: true | |
| type: boolean | |
| default: true | |
| increment: | |
| description: 'Version increment (patch, minor, major)' | |
| required: true | |
| type: choice | |
| options: | |
| - patch | |
| - minor | |
| - major | |
| default: patch | |
| pre_release: | |
| description: 'Pre-release identifier (e.g. beta, alpha, rc) — leave empty for a stable release' | |
| required: false | |
| type: string | |
| default: '' | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| environment: npm-publish | |
| permissions: | |
| contents: write | |
| id-token: write | |
| issues: write | |
| pull-requests: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version-file: .bun-version | |
| - name: Setup Node.js (for npm with OIDC support) | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '24' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Configure git | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Build library | |
| run: bun run build | |
| - name: Check types | |
| run: bun run check:typescript | |
| - name: Check linting and formatting | |
| run: bun run lint | |
| - name: Check circular dependencies | |
| run: bun run circular:check | |
| - name: Install Playwright browsers | |
| run: bunx playwright install --with-deps chromium | |
| working-directory: packages/uniwind | |
| - name: Run tests | |
| run: bun run test | |
| - name: Release | |
| working-directory: packages/uniwind | |
| run: | | |
| PRE_RELEASE="${{ inputs.pre_release }}" | |
| INCREMENT="${{ inputs.increment }}" | |
| DRY_RUN="${{ inputs.dry_run }}" | |
| ARGS="--ci $INCREMENT" | |
| if [ -n "$PRE_RELEASE" ]; then | |
| ARGS="$ARGS --preRelease=$PRE_RELEASE" | |
| fi | |
| if [ "$DRY_RUN" = "true" ]; then | |
| ARGS="$ARGS --dry-run" | |
| fi | |
| npx release-it $ARGS | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |