refactor(react): replace unicode-segmenter with built-in Intl.Segmenter #1215
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: Continuous Releases | |
| on: | |
| issue_comment: | |
| types: [created] | |
| jobs: | |
| release: | |
| name: Release Seed Design Packages | |
| if: | | |
| github.event.issue.pull_request && | |
| startsWith(github.event.comment.body, '/snapshot') && | |
| contains(fromJson('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.comment.author_association) | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write | |
| steps: | |
| - name: Add reaction | |
| uses: actions/github-script@v9 | |
| with: | |
| script: | | |
| github.rest.reactions.createForIssueComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| comment_id: context.payload.comment.id, | |
| content: 'eyes' | |
| }); | |
| - name: Checkout PR branch | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: refs/pull/${{ github.event.issue.number }}/head | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: "1.3.13" | |
| - name: Install Dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Build | |
| run: bun packages:build | |
| - name: Publish | |
| run: bunx pkg-pr-new publish './packages/*' './packages/react-headless/*' './packages/utils/*' --compact --comment=off --json output.json | |
| - name: Comment on PR | |
| uses: actions/github-script@v9 | |
| with: | |
| script: | | |
| const fs = require('fs'); | |
| const output = JSON.parse(fs.readFileSync('output.json', 'utf8')); | |
| const packages = output.packages | |
| .map(p => `\`${p.name}\`: \`${p.url}\``) | |
| .join('\n'); | |
| const body = `## 📦 Snapshot Release | |
| ${packages} | |
| > Triggered by @${{ github.event.comment.user.login }} via \`/snapshot\` | |
| `.replace(/^ +/gm, ''); | |
| await github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: ${{ github.event.issue.number }}, | |
| body | |
| }); | |
| - name: Add success reaction | |
| if: success() | |
| uses: actions/github-script@v9 | |
| with: | |
| script: | | |
| github.rest.reactions.createForIssueComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| comment_id: context.payload.comment.id, | |
| content: 'rocket' | |
| }); | |
| - name: Add failure reaction | |
| if: failure() | |
| uses: actions/github-script@v9 | |
| with: | |
| script: | | |
| github.rest.reactions.createForIssueComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| comment_id: context.payload.comment.id, | |
| content: '-1' | |
| }); |