Release #50
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 | |
| on: | |
| workflow_run: | |
| workflows: ["CI"] | |
| types: [completed] | |
| branches: [main] | |
| concurrency: | |
| group: release | |
| cancel-in-progress: false | |
| jobs: | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| if: github.event.workflow_run.conclusion == 'success' | |
| environment: npm | |
| timeout-minutes: 15 | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - uses: oven-sh/setup-bun@v2 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| registry-url: 'https://registry.npmjs.org' | |
| - uses: actions/cache@v5 | |
| with: | |
| path: ~/.bun/install/cache | |
| key: bun-${{ runner.os }}-${{ hashFiles('bun.lock') }} | |
| restore-keys: bun-${{ runner.os }}- | |
| - run: bun install --frozen-lockfile | |
| - run: bunx turbo build | |
| - name: Create Release Pull Request or Publish | |
| id: changesets | |
| uses: changesets/action@v1 | |
| with: | |
| version: bun run ci:version | |
| publish: bun run ci:publish | |
| commit: "chore: release" | |
| title: "chore: release" | |
| createGithubReleases: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Sync changelog to website | |
| if: steps.changesets.outputs.published == 'true' | |
| env: | |
| PUBLISHED_PACKAGES: ${{ steps.changesets.outputs.publishedPackages }} | |
| run: bun run scripts/sync-changelog-to-web.ts | |
| - name: Create changelog PR | |
| if: steps.changesets.outputs.published == 'true' | |
| uses: peter-evans/create-pull-request@v8 | |
| with: | |
| commit-message: "docs: sync changelog to website" | |
| branch: docs/sync-changelog | |
| title: "docs: sync changelog to website" | |
| body: "Auto-generated changelog entries from release." | |
| add-paths: apps/web/src/content/changelog/ | |
| delete-branch: true | |
| - name: Trigger website deploy | |
| if: steps.changesets.outputs.published == 'true' | |
| run: gh api repos/iamladi/sandcaster/actions/workflows/deploy-web.yml/dispatches -f ref=main | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |