From a3f7326e56b26ece8741abddc7c42290f31f76e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Tue, 8 Nov 2022 09:32:49 -0300 Subject: [PATCH] ci: Update to deploy electron to all platforms MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- .github/workflows/ci.yml | 42 ++++++++++++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5f5b16bdc..4a1d71448 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,8 +9,8 @@ on: - cron: '0 0 */6 * *' jobs: - build: - name: Test and Deploy + test: + name: Test runs-on: ubuntu-latest steps: - name: Checkout @@ -28,13 +28,43 @@ jobs: yarn build xvfb-run --auto-servernum yarn test:ci - - name: Build electron app + deploy-electron: + needs: test + runs-on: ${{ matrix.os }} + strategy: + matrix: + include: + - os: macos-latest + suffix: macos + extension: dmg + + - os: ubuntu-latest + suffix: linux + extension: AppImage + + - os: windows-latest + suffix: windows + extension: exe + steps: + - name: Checkout + uses: actions/checkout@v2 + + # Use node to install yarn in all OSs + - name: Install node + uses: actions/setup-node@v3 + with: + node-version: 16 + + - name: Build electron run: | + npm install --global yarn + yarn install --frozen-lockfile + yarn build yarn deploy:electron - mv dist/cockpit*.AppImage dist/cockpit.AppImage - name: Upload Artifact uses: actions/upload-artifact@v2 with: - name: cockpit - path: dist/cockpit*.AppImage \ No newline at end of file + name: cockpit-${{ matrix.suffix }} + path: dist/cockpit*.${{ matrix.extension }} + if-no-files-found: error \ No newline at end of file