chore: bump downstream packages to use latest AssistantAvatar (#3476) #2324
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: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| id-token: write | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| build: | |
| name: Build packages | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 # Should not take more than 30 minutes to build with docs | |
| outputs: | |
| cache-primary-key: ${{ steps.build-cache.outputs.cache-primary-key }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.26.0 | |
| # Needed following Github's transition from Node 16 to 20 | |
| - name: Install node-gyp | |
| run: pnpm add --global node-gyp | |
| - uses: actions/cache/restore@v4 | |
| name: Check for build cache | |
| id: build-cache | |
| with: | |
| path: | | |
| charts/*/dist/* | |
| charts/*/tsdoc.json | |
| charts/*/stories.js | |
| chat/*/dist/* | |
| chat/*/tsdoc.json | |
| chat/*/stories.js | |
| packages/*/dist/* | |
| packages/*/tsdoc.json | |
| packages/*/stories.js | |
| tools/*/dist/* | |
| tools/*/tsdoc.json | |
| tools/*/stories.js | |
| key: ${{ runner.os }}-build-cache-${{ hashFiles('package.json', 'pnpm-lock.yaml', '**/src/') }} | |
| # Only setup & build if there was no build cache hit | |
| - name: Use Node 22 | |
| uses: actions/setup-node@v4 | |
| if: ${{ steps.build-cache.outputs.cache-hit != 'true' }} | |
| with: | |
| node-version: 22 | |
| cache: 'pnpm' | |
| cache-dependency-path: 'pnpm-lock.yaml' | |
| - name: Install | |
| if: ${{ steps.build-cache.outputs.cache-hit != 'true' }} | |
| run: pnpm install --frozen-lockfile --prefer-offline | |
| - name: Build | |
| if: ${{ steps.build-cache.outputs.cache-hit != 'true' }} | |
| run: pnpm build:packages | |
| - name: Generate docs | |
| if: ${{ steps.build-cache.outputs.cache-hit != 'true' }} | |
| run: pnpm build:docs | |
| - uses: actions/cache/save@v4 | |
| name: Save build cache | |
| if: ${{ steps.build-cache.outputs.cache-hit != 'true' }} | |
| with: | |
| path: | | |
| charts/*/dist/* | |
| charts/*/tsdoc.json | |
| charts/*/stories.js | |
| chat/*/dist/* | |
| chat/*/tsdoc.json | |
| chat/*/stories.js | |
| packages/*/dist/* | |
| packages/*/tsdoc.json | |
| packages/*/stories.js | |
| tools/*/dist/* | |
| tools/*/tsdoc.json | |
| tools/*/stories.js | |
| key: ${{ steps.build-cache.outputs.cache-primary-key }} | |
| chromatic: | |
| name: Establish Chromatic baseline | |
| runs-on: ubuntu-latest | |
| needs: [build] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.26.0 | |
| - name: Use Node 22 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: 'pnpm' | |
| cache-dependency-path: 'pnpm-lock.yaml' | |
| - name: Install Dependencies | |
| run: pnpm install --frozen-lockfile --prefer-offline | |
| - uses: actions/cache/restore@v4 | |
| name: Restore build cache | |
| id: build-cache | |
| with: | |
| path: | | |
| charts/*/dist/* | |
| charts/*/tsdoc.json | |
| charts/*/stories.js | |
| chat/*/dist/* | |
| chat/*/tsdoc.json | |
| chat/*/stories.js | |
| packages/*/dist/* | |
| packages/*/tsdoc.json | |
| packages/*/stories.js | |
| tools/*/dist/* | |
| tools/*/tsdoc.json | |
| tools/*/stories.js | |
| key: ${{needs.build.outputs.cache-primary-key}} | |
| - name: Publish to Chromatic | |
| uses: chromaui/action@v13.3.4 | |
| with: | |
| projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | |
| buildScriptName: 'build-storybook' | |
| exitOnceUploaded: true | |
| exitZeroOnChanges: true | |
| autoAcceptChanges: true | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| needs: [build] | |
| outputs: | |
| published: ${{ steps.changesets.outputs.published }} | |
| publishedPackages: ${{ steps.changesets.outputs.publishedPackages }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.26.0 | |
| - name: Use Node 22 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: 'pnpm' | |
| cache-dependency-path: 'pnpm-lock.yaml' | |
| - name: Upgrade npm for OIDC support | |
| run: npm install -g npm@11.7.0 | |
| - name: Install Dependencies | |
| run: pnpm install --frozen-lockfile --prefer-offline | |
| - uses: actions/cache/restore@v4 | |
| name: Restore build cache | |
| id: build-cache | |
| with: | |
| path: | | |
| charts/*/dist/* | |
| charts/*/tsdoc.json | |
| charts/*/stories.js | |
| chat/*/dist/* | |
| chat/*/tsdoc.json | |
| chat/*/stories.js | |
| packages/*/dist/* | |
| packages/*/tsdoc.json | |
| packages/*/stories.js | |
| tools/*/dist/* | |
| tools/*/tsdoc.json | |
| tools/*/stories.js | |
| key: ${{needs.build.outputs.cache-primary-key}} | |
| - name: Version packages | |
| id: changesets | |
| uses: changesets/action@v1 | |
| with: | |
| version: pnpm run version # Rebuild packages to ensure any uncommitted pre-build artifacts | |
| publish: pnpm run publish | |
| createGithubReleases: true | |
| env: | |
| GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' | |
| NPM_CONFIG_PROVENANCE: true | |
| release-aws: | |
| name: Publish to AWS CodeArtifact | |
| runs-on: ubuntu-latest | |
| needs: [build, release] | |
| if: ${{ needs.release.outputs.published == 'true' }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.26.0 | |
| - name: Use Node 22 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: 'pnpm' | |
| cache-dependency-path: 'pnpm-lock.yaml' | |
| - name: Install Dependencies | |
| run: pnpm install --frozen-lockfile --prefer-offline | |
| - uses: actions/cache/restore@v4 | |
| name: Restore build cache | |
| id: build-cache | |
| with: | |
| path: | | |
| charts/*/dist/* | |
| charts/*/tsdoc.json | |
| charts/*/stories.js | |
| chat/*/dist/* | |
| chat/*/tsdoc.json | |
| chat/*/stories.js | |
| packages/*/dist/* | |
| packages/*/tsdoc.json | |
| packages/*/stories.js | |
| tools/*/dist/* | |
| tools/*/tsdoc.json | |
| tools/*/stories.js | |
| key: ${{needs.build.outputs.cache-primary-key}} | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_CODEARTIFACT_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_CODEARTIFACT_SECRET_ACCESS_KEY }} | |
| aws-region: us-east-1 | |
| - name: Login to CodeArtifact | |
| run: scripts/login-codeartifact.sh | |
| - name: Publish to CodeArtifact | |
| run: pnpm publish -r --no-git-checks | |
| notify: | |
| name: Notify Slack & Website | |
| runs-on: ubuntu-latest | |
| needs: [build, release] | |
| if: ${{ needs.release.outputs.published == 'true' }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.26.0 | |
| # Needed following Github's transition from Node 16 to 20 | |
| - name: Install node-gyp | |
| run: pnpm add --global node-gyp | |
| - name: Install | |
| run: pnpm install --frozen-lockfile --prefer-offline | |
| - uses: actions/cache/restore@v4 | |
| name: Restore build cache | |
| id: build-cache | |
| with: | |
| path: | | |
| charts/*/dist/* | |
| charts/*/tsdoc.json | |
| charts/*/stories.js | |
| chat/*/dist/* | |
| chat/*/tsdoc.json | |
| chat/*/stories.js | |
| packages/*/dist/* | |
| packages/*/tsdoc.json | |
| packages/*/stories.js | |
| tools/*/dist/* | |
| tools/*/tsdoc.json | |
| tools/*/stories.js | |
| key: ${{needs.build.outputs.cache-primary-key}} | |
| - name: Notify Slack channel of new releases | |
| id: slackbot | |
| run: pnpm run slackbot '${{ needs.release.outputs.publishedPackages }}' | |
| env: | |
| SLACK_BOT_TOKEN: '${{ secrets.SLACK_BOT_TOKEN }}' |