From b1b32051773dc686090d5008f9a5d95798674564 Mon Sep 17 00:00:00 2001 From: Mathis Brossier Date: Sun, 20 Oct 2024 12:46:17 +0200 Subject: [PATCH] update tauri-publish.yaml --- .github/workflows/tauri-publish.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/tauri-publish.yml b/.github/workflows/tauri-publish.yml index 1c832ed..527a18e 100644 --- a/.github/workflows/tauri-publish.yml +++ b/.github/workflows/tauri-publish.yml @@ -16,16 +16,16 @@ jobs: matrix: include: - platform: "macos-latest" # for Arm based macs (M1 and above). - args: "--target aarch64-apple-darwin" + target: "aarch64-apple-darwin" name: "macos-aarch64" - platform: "macos-latest" # for Intel based macs. - args: "--target x86_64-apple-darwin" + target: "x86_64-apple-darwin" name: "macos-x64" - platform: "ubuntu-latest" # for Tauri v1 you could replace this with ubuntu-20.04. - args: "" - name: "linux-ubuntu" - - platform: "twwe-server-windows-latest" - args: "" + target: "x86_64-unknown-linux-gnu" + name: "linux-x64" + - platform: "windows-latest" + target: "x86_64-pc-windows-msvc" name: "windows-x64" runs-on: ${{ matrix.platform }} @@ -38,7 +38,7 @@ jobs: node-version: lts/* - name: get version - run: echo "PACKAGE_VERSION=$(node -p "require('client/package.json').version")" >> $GITHUB_ENV + run: echo "PACKAGE_VERSION=$(node -p "require('./client/package.json').version")" >> $GITHUB_ENV - name: install Rust stable uses: dtolnay/rust-toolchain@stable @@ -74,7 +74,7 @@ jobs: with: use-cross: true command: build - args: server --verbose --release ${{ matrix.args }} + args: --manifest-path server/Cargo.toml --verbose --release --target ${{ matrix.target }} - name: build static site run: cd client && npm run build @@ -85,14 +85,14 @@ jobs: dirname: twwe-server_v${{ env.PACKAGE_VERSION }}_${{ matrix.name }} run: | mkdir "$dirname" - if [ "${{ matrix.os }}" = "windows-latest" ]; then + if [ "${{ matrix.platform }}" = "windows-latest" ]; then mv "server/target/${{ matrix.target }}/release/twwe-server.exe" "$dirname" else mv "server/target/${{ matrix.target }}/release/twwe-server" "$dirname" fi mv "client/dist" "$dirname/static" - if [ "${{ matrix.os }}" = "windows-latest" ]; then + if [ "${{ matrix.platform }}" = "windows-latest" ]; then 7z a "$dirname.zip" "$dirname" echo "ASSET=$dirname.zip" >> $GITHUB_ENV else