From 275936cf7eb80dc83009eb9856ab0a645633e554 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 11 Jul 2022 10:33:27 +0100 Subject: [PATCH] Windows MSI package support (#387) * Update package.json * Update package.json * Run `yarn fetch` so the artifacts are valid * Run `yarn fetch` so the artifacts are valid v2 * Update build.yaml --- .github/workflows/build.yaml | 45 +++++++++++++++++++++++++++++++++--- package.json | 7 +++--- 2 files changed, 46 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e6323d0..afa05e9 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -7,7 +7,32 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: + fetch: + name: Prepare + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-node@v3 + with: + cache: "yarn" + + - name: Install Deps + run: "yarn install --pure-lockfile" + + - name: Fetch Element Web + run: yarn run fetch --noverify --cfgdir element.io/nightly + + - uses: actions/upload-artifact@v3 + with: + name: webapp + retention-days: 1 + path: | + webapp.asar + package.json + windows: + needs: fetch strategy: matrix: include: @@ -21,6 +46,10 @@ jobs: steps: - uses: actions/checkout@v3 + - uses: actions/download-artifact@v3 + with: + name: webapp + - name: Cache .hak uses: actions/cache@v3 with: @@ -68,7 +97,7 @@ jobs: - name: Build App run: "yarn build --publish never -w ${{ matrix.build-args }}" - + - name: Upload Artifacts uses: actions/upload-artifact@v3 with: @@ -77,6 +106,7 @@ jobs: retention-days: 1 linux: + needs: fetch strategy: matrix: include: @@ -88,6 +118,10 @@ jobs: steps: - uses: actions/checkout@v3 + - uses: actions/download-artifact@v3 + with: + name: webapp + - name: Cache .hak uses: actions/cache@v3 with: @@ -119,7 +153,7 @@ jobs: - name: Build App run: "yarn build --publish never" - + - name: Upload Artifacts uses: actions/upload-artifact@v3 with: @@ -128,11 +162,16 @@ jobs: retention-days: 1 macos: + needs: fetch name: macOS (universal) runs-on: macos-latest steps: - uses: actions/checkout@v3 + - uses: actions/download-artifact@v3 + with: + name: webapp + - name: Cache .hak uses: actions/cache@v3 with: @@ -159,7 +198,7 @@ jobs: - name: Build App run: "yarn build:universal --publish never" - + - name: Upload Artifacts uses: actions/upload-artifact@v3 with: diff --git a/package.json b/package.json index ccb91d4..bbd6869 100644 --- a/package.json +++ b/package.json @@ -122,11 +122,12 @@ "darkModeSupport": true }, "win": { - "target": { - "target": "squirrel" - }, + "target": ["squirrel", "msi"], "sign": "scripts/electron_winSign" }, + "msi": { + "perMachine": true + }, "directories": { "output": "dist" },