From 8a3fcd88a210d8ce281471e15a9b517388b6dda6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C5=91rik=20Levente?= <33373714+Levminer@users.noreply.github.com> Date: Sat, 28 Sep 2024 22:51:39 +0200 Subject: [PATCH 1/5] create workflow --- .github/workflows/alpha-build.yml | 2 +- .github/workflows/unix-alpha-build.yml | 58 ++++++++++++++++++++++++++ 2 files changed, 59 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..c4318df --- /dev/null +++ b/.github/workflows/unix-alpha-build.yml @@ -0,0 +1,58 @@ +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: Install node modules + run: npm ci + + # 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/authme.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" From 1749d2869f52f3322213824717c905c4c0b98fd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C5=91rik=20Levente?= <33373714+Levminer@users.noreply.github.com> Date: Sat, 28 Sep 2024 23:01:34 +0200 Subject: [PATCH 2/5] Update unix-alpha-build.yml --- .github/workflows/unix-alpha-build.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/unix-alpha-build.yml b/.github/workflows/unix-alpha-build.yml index c4318df..a942e8b 100644 --- a/.github/workflows/unix-alpha-build.yml +++ b/.github/workflows/unix-alpha-build.yml @@ -31,6 +31,12 @@ jobs: - 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 libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf + # Build service installer - name: Build service installer run: npm run build:core From 99970840bab2841854143979f6b8a6697c4906e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C5=91rik=20Levente?= <33373714+Levminer@users.noreply.github.com> Date: Sat, 28 Sep 2024 23:11:03 +0200 Subject: [PATCH 3/5] Update unix-alpha-build.yml --- .github/workflows/unix-alpha-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unix-alpha-build.yml b/.github/workflows/unix-alpha-build.yml index a942e8b..bd5dff8 100644 --- a/.github/workflows/unix-alpha-build.yml +++ b/.github/workflows/unix-alpha-build.yml @@ -35,7 +35,7 @@ jobs: if: matrix.NAME == 'linux' run: | sudo apt-get update - sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf + sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf # Build service installer - name: Build service installer From 48de628291e22806c8f45f089dad96aa75487303 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C5=91rik=20Levente?= Date: Sat, 5 Oct 2024 12:06:23 +0200 Subject: [PATCH 4/5] fix macos build --- .github/workflows/unix-alpha-build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/unix-alpha-build.yml b/.github/workflows/unix-alpha-build.yml index bd5dff8..573c20b 100644 --- a/.github/workflows/unix-alpha-build.yml +++ b/.github/workflows/unix-alpha-build.yml @@ -28,6 +28,10 @@ jobs: 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 From 8cb1403940edd4a210771de0cb595daa9c09d899 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C5=91rik=20Levente?= Date: Sat, 5 Oct 2024 22:19:50 +0200 Subject: [PATCH 5/5] Update unix-alpha-build.yml --- .github/workflows/unix-alpha-build.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unix-alpha-build.yml b/.github/workflows/unix-alpha-build.yml index 573c20b..8ad98f8 100644 --- a/.github/workflows/unix-alpha-build.yml +++ b/.github/workflows/unix-alpha-build.yml @@ -56,7 +56,7 @@ jobs: run: | rm -rf target/release/build rm -rf target/release/deps - rm -rf target/release/bundle/appimage/authme.AppDir + rm -rf target/release/bundle/appimage/cores.AppDir npm run rename shell: bash @@ -66,3 +66,11 @@ jobs: 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"