chore: release main (#3139) #9735
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: "Chromatic" | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| env: | |
| PUBLIC_BUILD: true | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| # Detect which projects have changed | |
| detect-changes: | |
| uses: ./.github/workflows/_check-workspaces-changes.yaml | |
| chromatic: | |
| needs: detect-changes | |
| # Prevents running on the release-please branch | |
| if: | | |
| needs.detect-changes.outputs.package_react == 'true' && | |
| github.head_ref != 'release-please--branches--master' && | |
| !contains(github.event.pull_request.labels.*.name, 'autorelease') | |
| permissions: write-all | |
| name: "[⚛️ REACT] Run Chromatic" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: ./.github/actions/setup-node-pnpm | |
| - name: Build Core | |
| run: | | |
| pnpm --filter @factorialco/f0-core build | |
| - name: Run Chromatic | |
| id: chromatic | |
| uses: chromaui/action@latest | |
| with: | |
| workingDir: /packages/react | |
| projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | |
| autoAcceptChanges: "main" | |
| exitOnceUploaded: true | |
| - name: Publish Storybook Link in the comments | |
| if: github.event_name == 'pull_request' | |
| uses: dannyhw/[email protected] | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| review-url: ${{ steps.chromatic.outputs.url }} | |
| build-url: ${{ steps.chromatic.outputs.buildUrl }} | |
| storybook-url: ${{ steps.chromatic.outputs.storybookUrl }} |