From 1b51b5e75e0144740c719d17d3456f96e7c54520 Mon Sep 17 00:00:00 2001 From: Brain and Binary <48818899+brainandbinary@users.noreply.github.com> Date: Fri, 23 Aug 2024 14:52:08 +0600 Subject: [PATCH 1/5] Update rust.yml --- .github/workflows/rust.yml | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 901fa91..b9dabd1 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -5,7 +5,8 @@ on: branches: - release -# This workflow will trigger on each push to the `release` branch to create or update a GitHub release, build your app, and upload the artifacts to the release. +# This workflow triggers on each push to the `release` branch to create or update a GitHub release, +# build your app, and upload the artifacts to the release. jobs: publish-tauri: @@ -26,37 +27,46 @@ jobs: runs-on: ${{ matrix.platform }} steps: - - uses: actions/checkout@v4 + - name: Checkout code + uses: actions/checkout@v4 - - name: setup node + - name: Set up Node.js uses: actions/setup-node@v4 with: node-version: lts/* - - name: install Rust stable + - name: Install Rust stable uses: dtolnay/rust-toolchain@stable with: - # Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds. + # These targets are only used on macOS runners. targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} - - name: install dependencies (ubuntu only) - if: matrix.platform == 'ubuntu-22.04' # This must match the platform value defined above. + - name: Install dependencies (Ubuntu only) + if: matrix.platform == 'ubuntu-22.04' run: | sudo apt-get update sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf # webkitgtk 4.0 is for Tauri v1 - webkitgtk 4.1 is for Tauri v2. # You can remove the one that doesn't apply to your app to speed up the workflow a bit. - - name: install frontend dependencies + - name: Install frontend dependencies run: yarn install # change this to npm, pnpm or bun depending on which one you use. - - uses: tauri-apps/tauri-action@v0 + - name: Build the Tauri app + uses: tauri-apps/tauri-action@v0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version. + tagName: app-v__VERSION__ # The action automatically replaces __VERSION__ with the app version. releaseName: 'App v__VERSION__' releaseBody: 'See the assets to download this version and install.' releaseDraft: true prerelease: false args: ${{ matrix.args }} + + - name: Upload Build Artifacts + uses: actions/upload-artifact@v3 + with: + name: tauri-build-${{ matrix.platform }} + path: | + src-tauri/target/release/bundle/ # Adjust this path based on where your Tauri build output is located From 75f4388ea3d824e9e30d83331317029f6c8b7b55 Mon Sep 17 00:00:00 2001 From: Brain and Binary <48818899+brainandbinary@users.noreply.github.com> Date: Sat, 24 Aug 2024 14:34:27 +0600 Subject: [PATCH 2/5] Update rust.yml --- .github/workflows/rust.yml | 44 ++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index b9dabd1..0a81253 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -5,9 +5,6 @@ on: branches: - release -# This workflow triggers on each push to the `release` branch to create or update a GitHub release, -# build your app, and upload the artifacts to the release. - jobs: publish-tauri: permissions: @@ -16,48 +13,51 @@ jobs: fail-fast: false matrix: include: - - platform: 'macos-latest' # for Arm based macs (M1 and above). + - platform: 'macos-latest' args: '--target aarch64-apple-darwin' - - platform: 'macos-latest' # for Intel based macs. + - platform: 'macos-latest' args: '--target x86_64-apple-darwin' - - platform: 'ubuntu-22.04' # for Tauri v1 you could replace this with ubuntu-20.04. + - platform: 'ubuntu-22.04' args: '' - platform: 'windows-latest' args: '' runs-on: ${{ matrix.platform }} steps: - - name: Checkout code - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - - name: Set up Node.js + - name: setup node uses: actions/setup-node@v4 with: node-version: lts/* - - name: Install Rust stable + - name: install Rust stable uses: dtolnay/rust-toolchain@stable with: - # These targets are only used on macOS runners. targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} - - name: Install dependencies (Ubuntu only) + - name: install dependencies (ubuntu only) if: matrix.platform == 'ubuntu-22.04' run: | sudo apt-get update sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf - # webkitgtk 4.0 is for Tauri v1 - webkitgtk 4.1 is for Tauri v2. - # You can remove the one that doesn't apply to your app to speed up the workflow a bit. - - name: Install frontend dependencies - run: yarn install # change this to npm, pnpm or bun depending on which one you use. + - name: install windows dependencies (manual) + if: matrix.platform == 'windows-latest' + run: | + # Example of directly downloading a dependency + # Replace the URL and installation commands with those relevant to your needs + curl -L -o winpcap.exe https://www.winpcap.org/install/bin/WinPcap_4_1_3.exe + start /wait winpcap.exe /S + + - name: install frontend dependencies + run: yarn install - - name: Build the Tauri app - uses: tauri-apps/tauri-action@v0 + - uses: tauri-apps/tauri-action@v0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tagName: app-v__VERSION__ # The action automatically replaces __VERSION__ with the app version. + tagName: app-v__VERSION__ releaseName: 'App v__VERSION__' releaseBody: 'See the assets to download this version and install.' releaseDraft: true @@ -67,6 +67,8 @@ jobs: - name: Upload Build Artifacts uses: actions/upload-artifact@v3 with: - name: tauri-build-${{ matrix.platform }} + name: app-build-${{ matrix.platform }} path: | - src-tauri/target/release/bundle/ # Adjust this path based on where your Tauri build output is located + src-tauri/target/release/your-app-name.exe + src-tauri/target/release/your-app-name.dmg + src-tauri/target/release/your-app-name.AppImage From 987bb75bf76ef19c7399e6e16d505e423284dc91 Mon Sep 17 00:00:00 2001 From: Brain and Binary <48818899+brainandbinary@users.noreply.github.com> Date: Sat, 24 Aug 2024 14:42:57 +0600 Subject: [PATCH 3/5] Update rust.yml --- .github/workflows/rust.yml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 0a81253..7692db9 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -3,7 +3,7 @@ name: 'publish' on: push: branches: - - release + - main jobs: publish-tauri: @@ -26,31 +26,29 @@ jobs: steps: - uses: actions/checkout@v4 - - name: setup node + - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: lts/* - - name: install Rust stable + - name: Install Rust stable uses: dtolnay/rust-toolchain@stable with: targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} - - name: install dependencies (ubuntu only) + - name: Install dependencies (Ubuntu only) if: matrix.platform == 'ubuntu-22.04' run: | sudo apt-get update sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf - - name: install windows dependencies (manual) + - name: Install Windows dependencies (WinPcap) if: matrix.platform == 'windows-latest' run: | - # Example of directly downloading a dependency - # Replace the URL and installation commands with those relevant to your needs curl -L -o winpcap.exe https://www.winpcap.org/install/bin/WinPcap_4_1_3.exe - start /wait winpcap.exe /S + Start-Process -FilePath .\winpcap.exe -ArgumentList '/S' -NoNewWindow -Wait - - name: install frontend dependencies + - name: Install frontend dependencies run: yarn install - uses: tauri-apps/tauri-action@v0 From e32524e7923222f53197d9ed5fced6818870bf98 Mon Sep 17 00:00:00 2001 From: Brain and Binary <48818899+brainandbinary@users.noreply.github.com> Date: Sat, 24 Aug 2024 14:43:11 +0600 Subject: [PATCH 4/5] Update rust.yml --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 7692db9..61639c2 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -3,7 +3,7 @@ name: 'publish' on: push: branches: - - main + - release jobs: publish-tauri: From 8688ab32b7140721e169352dc8acbc7fada839e8 Mon Sep 17 00:00:00 2001 From: Brain and Binary <48818899+brainandbinary@users.noreply.github.com> Date: Sat, 24 Aug 2024 15:05:38 +0600 Subject: [PATCH 5/5] Update rust.yml --- .github/workflows/rust.yml | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 61639c2..067e063 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -13,11 +13,11 @@ jobs: fail-fast: false matrix: include: - - platform: 'macos-latest' + - platform: 'macos-latest' # for Arm-based Macs (M1 and above). args: '--target aarch64-apple-darwin' - - platform: 'macos-latest' + - platform: 'macos-latest' # for Intel-based Macs. args: '--target x86_64-apple-darwin' - - platform: 'ubuntu-22.04' + - platform: 'ubuntu-22.04' # for Tauri v1 you could replace this with ubuntu-20.04. args: '' - platform: 'windows-latest' args: '' @@ -26,36 +26,34 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Setup Node.js + - name: setup node uses: actions/setup-node@v4 with: node-version: lts/* - - name: Install Rust stable + - name: install Rust stable uses: dtolnay/rust-toolchain@stable with: + # Those targets are only used on macOS runners so it's in an `if` to slightly speed up Windows and Linux builds. targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} - - name: Install dependencies (Ubuntu only) - if: matrix.platform == 'ubuntu-22.04' + - name: install dependencies (ubuntu only) + if: matrix.platform == 'ubuntu-22.04' # This must match the platform value defined above. run: | sudo apt-get update sudo apt-get install -y libwebkit2gtk-4.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf + # webkitgtk 4.0 is for Tauri v1 - webkitgtk 4.1 is for Tauri v2. + # You can remove the one that doesn't apply to your app to speed up the workflow a bit. - - name: Install Windows dependencies (WinPcap) - if: matrix.platform == 'windows-latest' - run: | - curl -L -o winpcap.exe https://www.winpcap.org/install/bin/WinPcap_4_1_3.exe - Start-Process -FilePath .\winpcap.exe -ArgumentList '/S' -NoNewWindow -Wait - - - name: Install frontend dependencies - run: yarn install + - name: install frontend dependencies + run: yarn install # change this to npm, pnpm or bun depending on which one you use. - - uses: tauri-apps/tauri-action@v0 + - name: build tauri app + uses: tauri-apps/tauri-action@v0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tagName: app-v__VERSION__ + tagName: app-v__VERSION__ # the action automatically replaces __VERSION__ with the app version. releaseName: 'App v__VERSION__' releaseBody: 'See the assets to download this version and install.' releaseDraft: true