Document migration authoring strategy and emit/runner ADRs #1990
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: Preview Release | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "!**" | |
| concurrency: | |
| group: preview-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.sha }} | |
| cancel-in-progress: true | |
| jobs: | |
| preview: | |
| name: Publish preview | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write # Required for pkg.pr.new to post PR comments | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Setup mise | |
| uses: jdx/mise-action@9dc7d5dd454262207dea3ab5a06a3df6afc8ff26 # v3.4.1 | |
| with: | |
| cache: true | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build packages | |
| run: pnpm build | |
| - name: Collect publishable packages | |
| id: packages | |
| run: | | |
| PACKAGES=$(node scripts/list-publishable-packages.mjs) | |
| # Use heredoc to safely write to GITHUB_OUTPUT (prevents injection) | |
| { | |
| echo "list<<EOF" | |
| echo "$PACKAGES" | |
| echo "EOF" | |
| } >> "$GITHUB_OUTPUT" | |
| echo "Packages to publish:" | |
| echo "$PACKAGES" | tr ' ' '\n' | |
| - name: Publish to pkg.pr.new | |
| # Use https://github.com/stackblitz-labs/pkg.pr.new/tags to see the latest version available | |
| # --compact requires repository field in the *published* npm manifest; | |
| # add it back after the next npm publish includes the repository field. | |
| run: pnpm dlx pkg-pr-new@0.0.62 publish --pnpm --comment=update ${{ steps.packages.outputs.list }} |