From 9a3bf446446d8f1ee1421e2f8516df3829b55af2 Mon Sep 17 00:00:00 2001 From: Lucy Bridges Date: Tue, 11 Jul 2023 17:34:50 +0100 Subject: [PATCH] Build executable for linux The AppImage didn't work as expected for me. However, the .deb seems to install as expected. --- .github/workflows/main.yml | 39 ++++++++++++++++++++++++++++++++++++++ sacro-app/package.json | 6 +++--- 2 files changed, 42 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 14a0b6d..cc9e15c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -86,6 +86,45 @@ jobs: path: cypress/videos if-no-files-found: ignore + build-linux: + needs: [check, test-linux] + permissions: + contents: write + runs-on: ubuntu-22.04 + + steps: + - uses: actions/checkout@v3 + - uses: "opensafely-core/setup-action@v1" + with: + python-version: "3.11" + - uses: actions/setup-node@v3 + with: + node-version-file: '.node-version' + cache: "npm" + cache-dependency-path: | + **/package-lock.json + sacro-app/package-lock.json + # our just setup doesn't make just available on the path + - uses: extractions/setup-just@69d82fb0233557aec017ef13706851d0694e0f1d + - name: Download sample data + run: just test-outputs + - name: Build binary + run: just build + - name: Build app + run: just sacro-app/build + # this gets us cleaner paths in our artifact + - name: Copy built msi + run: cp sacro-app/dist/SACRO*.msi . + - name: Upload build + if: success() + uses: actions/upload-artifact@v3 + with: + name: SACRO-latest-linux-build + path: | + SACRO*.msi + outputs/* + !outputs/.keep + build-windows: needs: [check, test-windows] permissions: diff --git a/sacro-app/package.json b/sacro-app/package.json index 99b8ec1..5374969 100644 --- a/sacro-app/package.json +++ b/sacro-app/package.json @@ -1,10 +1,10 @@ { "name": "@opensafely/sacro", - "productName": "SACRO", + "productName": "sacro", "version": "0.1.0", "main": "main.js", "description": "SACRO Output Viewer", - "author": "OpenSAFELY", + "author": "OpenSAFELY ", "homepage": "https://github.com/opensafely-core/sacro", "scripts": { "dev": "electron . --no-sandbox", @@ -29,7 +29,7 @@ ] }, "linux": { - "target": "AppImage", + "target": "deb", "category": "Science" }, "extraResources": [