From fabbfc3afe533102db2426c67e382ae842ff2540 Mon Sep 17 00:00:00 2001 From: kyranjamie Date: Mon, 9 Oct 2023 22:29:25 +0200 Subject: [PATCH] refactor: build job --- .github/workflows/build-extension.yml | 51 ++++++--------------------- 1 file changed, 10 insertions(+), 41 deletions(-) diff --git a/.github/workflows/build-extension.yml b/.github/workflows/build-extension.yml index d6374c4670e..a369cc3ffb8 100644 --- a/.github/workflows/build-extension.yml +++ b/.github/workflows/build-extension.yml @@ -32,11 +32,16 @@ jobs: header: '> _Building Leather…_' GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - build-chromium: + build: name: Build debug Chrome extension runs-on: ubuntu-latest needs: - pre-run + strategy: + matrix: + target: [chromium, firefox] + env: + TARGET_BROWSER: ${{ matrix.target }} steps: - uses: actions/checkout@v4 with: @@ -59,45 +64,10 @@ jobs: run: sh build-ext.sh - uses: actions/upload-artifact@v3 - name: Upload Chrome Extension Zip - with: - name: leather-chromium - path: leather-chromium.zip - - build-firefox: - name: Build debug Firefox extension - runs-on: ubuntu-latest - needs: - - pre-run - env: - TARGET_BROWSER: firefox - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha }} - - - uses: actions/cache@v3 - id: cache-node-modules - with: - path: '**/node_modules' - key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**/package.json') }} - - - uses: ./.github/actions/provision - - - name: Build project - run: yarn build - - - name: Build extension - run: sh build-ext.sh - - - name: Rename file - run: mv leather-chromium.zip leather-firefox.zip - - - uses: actions/upload-artifact@v3 + name: Upload ${{ matrix.target }} Extension Zip with: - name: leather-firefox - path: leather-firefox.zip + name: leather-${{ matrix.target }} + path: dist add-download-link: name: Add link to built extensions @@ -105,8 +75,7 @@ jobs: runs-on: ubuntu-latest needs: - pre-run - - build-chromium - - build-firefox + - build steps: - uses: kyranjamie/pull-request-fixed-header@v1.0.1 with: