From 96e7c4773a9361d2c6e2a6451cc6e8f57479f4ee Mon Sep 17 00:00:00 2001 From: Mikkel RINGAUD Date: Sun, 27 Aug 2023 21:47:44 +0200 Subject: [PATCH] chore(ci): first drafts --- .github/workflows/beta-artifact.yml | 92 +++++++++++++++++++++++++++++ src-tauri/tauri.conf.json | 7 ++- 2 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/beta-artifact.yml diff --git a/.github/workflows/beta-artifact.yml b/.github/workflows/beta-artifact.yml new file mode 100644 index 0000000..0c45483 --- /dev/null +++ b/.github/workflows/beta-artifact.yml @@ -0,0 +1,92 @@ +name: Create beta artifacts + +on: + push: + branches: + - main + +jobs: + make: + if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request' + + strategy: + fail-fast: false + matrix: + toolchain: [stable] + + target: + - x86_64-unknown-linux-gnu + - aarch64-unknown-linux-gnu + - x86_64-apple-darwin + - aarch64-apple-darwin + - x86_64-pc-windows-msvc + include: + - os: ubuntu-20.04 + target: x86_64-unknown-linux-gnu + use-cross: false + + - os: ubuntu-20.04 + target: aarch64-unknown-linux-gnu + use-cross: true + + - os: macos-latest + target: x86_64-apple-darwin + use-cross: false + + - os: macos-11 + target: aarch64-apple-darwin + use-cross: false + + - os: windows-latest + target: x86_64-pc-windows-msvc + use-cross: false + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v3 + + - name: Setup pnpm + uses: pnpm/action-setup@v2 + with: + version: 8 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 18 + cache: 'pnpm' + + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + with: + toolchain: ${{ matrix.toolchain }} + target: ${{ matrix.target }} + + - name: Install apt dependencies (Ubuntu only) + if: matrix.os == 'ubuntu-20.04' + run: | + sudo apt-get update + sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf + + - name: Handle Rust dependencies caching + uses: Swatinem/rust-cache@v2 + with: + key: v1-${{ matrix.target }} + + - name: Install pnpm dependencies + run: pnpm install + + - run: | + cargo install tauri-cli + cd ./src-tauri + + - name: Build using cargo + uses: actions-rs/cargo@v1 + with: + use-cross: true + command: tauri + args: build --release --target ${{ matrix.target }} + + - run: | + ls ./target/release \ No newline at end of file diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 0ebf9c7..e092028 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -54,7 +54,12 @@ "identifier": "com.github.vexcited.solidcord", "longDescription": "A fast and open-source web client for Discord that is made with performance in mind.", "shortDescription": "A fast and open-source web client for Discord.", - "targets": "all" + "targets": [ + "deb", + "nsis", + "app", + "updater" + ] }, "security": { "csp": null