From bbc65a7ec1359dd16c45d78a242242279ccbd039 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C5=91rik=20Levente?= <33373714+Levminer@users.noreply.github.com> Date: Sat, 5 Oct 2024 22:57:11 +0200 Subject: [PATCH] mac and linux build --- .github/workflows/alpha-build.yml | 2 +- .github/workflows/unix-alpha-build.yml | 76 ++++++++++++++++++++++++++ 2 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/unix-alpha-build.yml diff --git a/.github/workflows/alpha-build.yml b/.github/workflows/alpha-build.yml index c60417f..6abc52b 100644 --- a/.github/workflows/alpha-build.yml +++ b/.github/workflows/alpha-build.yml @@ -1,4 +1,4 @@ -name: Alpha build +name: Alpha Windows build on: push diff --git a/.github/workflows/unix-alpha-build.yml b/.github/workflows/unix-alpha-build.yml new file mode 100644 index 0000000..8ad98f8 --- /dev/null +++ b/.github/workflows/unix-alpha-build.yml @@ -0,0 +1,76 @@ +name: Alpha Unix build + +on: push + +jobs: + build: + strategy: + matrix: + include: + - os: macos-latest + NAME: macos + - os: ubuntu-latest + NAME: linux + + runs-on: ${{ matrix.os}} + + env: + TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }} + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install cross-rs + run: cargo install cross + + - name: Build service executable + if: matrix.NAME == 'linux' + run: cd platforms/unix/daemon && cargo build --release && cross build --release --target aarch64-unknown-linux-gnu + + - name: Build service executable + if: matrix.NAME == 'macos' + run: cd platforms/unix/daemon && cargo build --release + + - name: Install node modules + run: npm ci + + - name: Install webkit2gtk (ubuntu only) + if: matrix.NAME == 'linux' + run: | + sudo apt-get update + sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf + + # Build service installer + - name: Build service installer + run: npm run build:core + + - name: Get version + id: version + uses: notiz-dev/github-action-json-property@release + with: + path: package.json + prop_path: version + + - name: Remove useless folders + run: | + rm -rf target/release/build + rm -rf target/release/deps + rm -rf target/release/bundle/appimage/cores.AppDir + npm run rename + shell: bash + + # Upload the unpackaged app + - name: Upload service installer + uses: actions/upload-artifact@v4 + with: + name: "cores-service-${{matrix.NAME}}-x64-installer" + path: "target/release" + + # Upload the unpackaged app + - name: Upload service installer + if: matrix.NAME == 'linux' + uses: actions/upload-artifact@v4 + with: + name: "cores-service-${{matrix.NAME}}-arm64-service" + path: "target/aarch64-unknown-linux-gnu/release"