[OB-63] Setup SDKs for submodule structure #21
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: Monorepo | |
| on: | |
| push: | |
| branches: ['main'] | |
| pull_request: | |
| types: [opened, synchronize] | |
| concurrency: ${{ github.workflow }}-${{ github.ref }} | |
| jobs: | |
| yarn-monorepo: | |
| name: Build Yarn Turborepo | |
| timeout-minutes: 60 | |
| runs-on: ubuntu-latest | |
| # configures turborepo Remote Caching | |
| env: | |
| TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
| TURBO_TEAM: ${{ secrets.TURBO_TEAM }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: launchdarkly/common-actions/ssh-key-by-repo@main | |
| with: | |
| repo_keys_map: | | |
| { | |
| "launchdarkly/rrweb": ${{ toJSON(secrets.LAUNCHDARKLY_RRWEB_DEPLOY_KEY) }} | |
| } | |
| # automatically caches dependencies based on yarn.lock | |
| - name: Setup Node.js environment | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: lts/* | |
| cache: 'yarn' | |
| - name: Install js dependencies | |
| run: yarn | |
| - name: Check yarn for duplicate deps | |
| run: yarn dedupe --check | |
| - name: Check generated files for Reflame | |
| run: yarn reflame-check | |
| - name: Check formatting | |
| run: yarn format-check | |
| - name: Configure AWS credentials | |
| if: github.ref == 'refs/heads/main' | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| aws-region: us-east-2 | |
| - name: Install Doppler CLI | |
| uses: dopplerhq/cli-action@v3 | |
| - name: Install Playwright Browsers | |
| run: npx playwright install --with-deps | |
| - name: Build & test (in a fork without doppler) | |
| run: yarn test:all | |
| env: | |
| GRAPHCMS_TOKEN: ${{ secrets.GRAPHCMS_TOKEN }} | |
| NEXT_PUBLIC_HIGHLIGHT_PROJECT_ID: 1jdkoe52 | |
| REACT_APP_COMMIT_SHA: ${{ github.event.pull_request.head.sha || github.sha }} | |
| - name: Configure yarn npm registry credentials | |
| if: github.ref == 'refs/heads/main' | |
| run: | | |
| yarn config set npmRegistryServer "https://registry.npmjs.org" | |
| yarn config set npmAuthToken "${NPM_TOKEN}" | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN_HIGHLIGHT_RUN }} | |
| - name: Publish npm packages | |
| if: github.ref == 'refs/heads/main' | |
| id: changesets-publish | |
| uses: changesets/action@v1 | |
| with: | |
| publish: yarn publish:turbo | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN_HIGHLIGHT_RUN }} | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_HIGHLIGHT_RUN }} | |
| - name: Release changesets | |
| if: github.ref == 'refs/heads/main' | |
| id: changesets-version | |
| uses: changesets/action@v1 | |
| with: | |
| version: yarn changeset version | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN_HIGHLIGHT_RUN }} | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_HIGHLIGHT_RUN }} |