From 852c3c7bc12ffee5afbd45edff97fc1d3c81864e Mon Sep 17 00:00:00 2001 From: Jeremias Peier Date: Wed, 3 Jul 2024 13:17:04 +0200 Subject: [PATCH] build: remove chromatic logic --- .github/workflows/continuous-integration.yml | 69 -------------------- .github/workflows/release-please.yml | 17 ----- 2 files changed, 86 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 6251e5f864..28bf167e56 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -87,75 +87,6 @@ jobs: name: storybook path: dist/storybook/ - is-pr-open: - runs-on: ubuntu-latest - if: github.event_name == 'push' - needs: [build, lint, test] - outputs: - is-PR: ${{ !!fromJson(steps.get_issue_number.outputs.result).number }} - is-draft: ${{ fromJson(steps.get_issue_number.outputs.result).draft }} - title: ${{ fromJson(steps.get_issue_number.outputs.result).title }} - steps: - - uses: actions/github-script@v7 - id: get_issue_number - with: - script: | - const pr = (await github.rest.repos.listPullRequestsAssociatedWithCommit({ - commit_sha: context.sha, - owner: context.repo.owner, - repo: context.repo.repo, - })).data[0]; - - return pr ? { - number: pr.number, - title: pr.title, - draft: pr.draft, - state: pr.state - } : {}; - - name: Log - run: echo "Number ${number}, isDraft ${isDraft}, title '${title}', data ${data}" - env: - data: ${{ steps.get_issue_number.outputs.result }} - number: ${{ fromJson(steps.get_issue_number.outputs.result).number }} - title: ${{ fromJson(steps.get_issue_number.outputs.result).title }} - isDraft: ${{ fromJson(steps.get_issue_number.outputs.result).draft }} - - chromatic: - runs-on: ubuntu-latest - if: github.event_name == 'push' && needs.is-pr-open.outputs.is-PR == 'true' && needs.is-pr-open.outputs.is-draft == 'false' - needs: [is-pr-open] - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - uses: actions/setup-node@v4 - with: - node-version-file: .nvmrc - cache: yarn - - run: yarn install --frozen-lockfile --non-interactive - - name: Generate chromatic stories - run: yarn generate:chromatic-stories - - uses: actions/github-script@v7 - id: version - with: - script: | - const sha = context.payload.pull_request?.head.sha ?? context.sha; - return `${require('./package.json').version}-rev.${sha.substring(0, 10)}`; - result-encoding: string - - name: Create versioned storybook for chromatic - run: STORYBOOK_COMPONENTS_VERSION=${{ steps.version.outputs.result }} yarn build:storybook - - name: Publish to Chromatic - id: chromatic-publish - uses: chromaui/action@v1 - with: - projectToken: ${{ secrets.CHROMATIC_TOKEN }} - storybookBuildDir: dist/storybook - exitOnceUploaded: true - exitZeroOnChanges: true - zip: true - onlyChanged: true - externals: '**/elements/core/styles/**/*.scss' - visual-regression: runs-on: ubuntu-latest if: github.event_name == 'pull_request' diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 096b099566..cf8d343a03 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -95,20 +95,3 @@ jobs: docker push $IMAGE_REPO_STORYBOOK:dev env: DOCKER_BUILDKIT: 1 - - - name: Generate chromatic stories - run: yarn generate:chromatic-stories - - name: Create versioned storybook for chromatic - run: STORYBOOK_COMPONENTS_VERSION="${{ steps.version.outputs.version }}" yarn build:storybook - env: - CHROMATIC: true - # Send storybook to chromatic. These snapshots should be accepted as new - # baseline in storybook. - - name: Publish to Chromatic - uses: chromaui/action@v1 - with: - projectToken: ${{ secrets.CHROMATIC_TOKEN }} - storybookBuildDir: dist/storybook - autoAcceptChanges: true - exitZeroOnChanges: true - zip: true