Full page extension views, containers, shared headers + footers #7213
Workflow file for this run
This file contains 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: PR extension build | |
on: [pull_request, workflow_dispatch] | |
jobs: | |
pre-run: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cancel previous runs | |
uses: styfle/cancel-workflow-action@main | |
with: | |
access_token: ${{ github.token }} | |
sha-hash: | |
runs-on: ubuntu-latest | |
outputs: | |
SHORT_SHA: ${{ steps.short-sha.outputs.SHORT_SHA }} | |
steps: | |
- name: Make short commit SHA | |
id: short-sha | |
run: echo "SHORT_SHA=`echo ${{ github.event.pull_request.head.sha }} | cut -c1-7`" >> $GITHUB_OUTPUT | |
set-in-progress-message: | |
if: github.repository == 'leather-wallet/extension' && github.actor != 'dependabot[bot]' | |
runs-on: ubuntu-latest | |
needs: | |
- pre-run | |
- sha-hash | |
steps: | |
- uses: kyranjamie/pull-request-fixed-header@v1.0.1 | |
with: | |
header: '> _Building Leather at commit ${{ needs.sha-hash.outputs.SHORT_SHA }}_' | |
GITHUB_TOKEN: ${{ secrets.LEATHER_BOT }} | |
build: | |
name: build-${{ matrix.target }}-extension | |
runs-on: ubuntu-latest | |
needs: | |
- pre-run | |
- sha-hash | |
strategy: | |
matrix: | |
# Firefox removed while off store | |
target: [chromium] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- uses: ./.github/actions/provision | |
- name: Build project | |
run: pnpm build | |
env: | |
WALLET_ENVIRONMENT: feature | |
TARGET_BROWSER: ${{ matrix.target }} | |
COINBASE_APP_ID: ${{ secrets.COINBASE_APP_ID }} | |
MOONPAY_API_KEY: ${{ secrets.MOONPAY_API_KEY }} | |
SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | |
SEGMENT_WRITE_KEY: ${{ secrets.SEGMENT_WRITE_KEY_STAGING }} | |
TRANSAK_API_KEY: ${{ secrets.TRANSAK_API_KEY }} | |
BESTINSLOT_API_KEY: ${{ secrets.BESTINSLOT_API_KEY }} | |
PR_NUMBER: ${{ github.event.number }} | |
COMMIT_SHA: ${{ needs.sha-hash.outputs.SHORT_SHA }} | |
- uses: actions/upload-artifact@v3 | |
name: Upload ${{ matrix.target }} extension zip | |
with: | |
name: leather-${{ matrix.target }}-${{ needs.sha-hash.outputs.SHORT_SHA }} | |
path: dist | |
set-download-link: | |
if: github.repository == 'leather-wallet/extension' && github.actor != 'dependabot[bot]' | |
runs-on: ubuntu-latest | |
needs: | |
- pre-run | |
- sha-hash | |
- build | |
steps: | |
- name: Extract branch name | |
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT | |
id: extract_branch | |
- name: Storybook parsed branch name | |
id: storybook_branch | |
run: echo "STORYBOOK_BRANCH=`echo ${{ steps.extract_branch.outputs.branch }} | sed 's/\//\-/g'`" >> $GITHUB_OUTPUT | |
- uses: kyranjamie/pull-request-fixed-header@v1.0.1 | |
env: | |
EXTENSION_BUILD_LINK: '[Extension build](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})' | |
TEST_REPORT_LINK: '[Test report](https://leather-wallet.github.io/playwright-reports/${{ steps.extract_branch.outputs.branch }})' | |
STORYBOOK_LINK: '[Storybook](https://${{ steps.storybook_branch.outputs.STORYBOOK_BRANCH }}--65982789c7e2278518f189e7.chromatic.com)' | |
CHROMATIC_LINK: '[Chromatic](https://www.chromatic.com/library?appId=65982789c7e2278518f189e7&branch=${{ steps.extract_branch.outputs.branch }})' | |
with: | |
GITHUB_TOKEN: ${{ secrets.LEATHER_BOT }} | |
header: | | |
> Try out Leather build ${{ needs.sha-hash.outputs.SHORT_SHA }} — ${{ env.EXTENSION_BUILD_LINK }}, ${{ env.TEST_REPORT_LINK }}, ${{ env.STORYBOOK_LINK }}, ${{ env.CHROMATIC_LINK }} |