From 0a13f7b6bcfeef69aed86474f85ba06bfcc62051 Mon Sep 17 00:00:00 2001 From: razor950 Date: Wed, 6 Nov 2024 23:04:50 -0500 Subject: [PATCH] commit linux / macos and windows nightly workflows --- .github/workflows/linux-nightly.yml | 73 +++++++++++++++++++++++++++ .github/workflows/macos-nightly.yml | 68 +++++++++++++++++++++++++ .github/workflows/windows-nightly.yml | 61 ++++++++++++++++++++++ 3 files changed, 202 insertions(+) create mode 100644 .github/workflows/linux-nightly.yml create mode 100644 .github/workflows/macos-nightly.yml create mode 100644 .github/workflows/windows-nightly.yml diff --git a/.github/workflows/linux-nightly.yml b/.github/workflows/linux-nightly.yml new file mode 100644 index 0000000..879e822 --- /dev/null +++ b/.github/workflows/linux-nightly.yml @@ -0,0 +1,73 @@ +name: Linux (x86) Nightly Build + +on: + schedule: + - cron: '0 0 * * *' # Runs at 00:00 UTC every day + workflow_dispatch: # Allows manual triggering + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + name: Build Linux Packages + runs-on: ubuntu-20.04 # Using 20.04 for broader compatibility + + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 'lts/*' + cache: 'npm' + + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + + - name: Install Linux Dependencies + run: | + sudo apt-get update + sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev + + - name: Install Dependencies + run: | + npm install + + - name: Build Frontend + run: npm run build + + - name: Build AppImage (x86_64) + run: | + echo "Building AppImage for x86_64..." + npm run tauri build -- --target x86_64-unknown-linux-gnu --bundles appimage + + - name: Build Debian Package (x86_64) + run: | + echo "Building Debian package for x86_64..." + npm run tauri build -- --target x86_64-unknown-linux-gnu --bundles deb + + - name: Upload AppImage + uses: actions/upload-artifact@v4 + with: + name: linux-appimage + path: src-tauri/target/release/bundle/appimage/*.AppImage + + - name: Upload Debian Package + uses: actions/upload-artifact@v4 + with: + name: linux-deb + path: src-tauri/target/release/bundle/deb/*.deb + + - name: Create Release + if: github.event_name == 'schedule' # Only create release for scheduled builds + uses: softprops/action-gh-release@v1 + with: + name: Linux Nightly Build ${{ github.sha }} + tag_name: linux-nightly-${{ github.sha }} + files: | + src-tauri/target/release/bundle/appimage/*.AppImage + src-tauri/target/release/bundle/deb/*.deb + prerelease: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/macos-nightly.yml b/.github/workflows/macos-nightly.yml new file mode 100644 index 0000000..f752186 --- /dev/null +++ b/.github/workflows/macos-nightly.yml @@ -0,0 +1,68 @@ +name: MacOS Nightly Build + +on: + workflow_dispatch: # Allows manual triggering + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + name: Build MacOS Apps + runs-on: macos-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 'lts/*' + cache: 'npm' + + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + + - name: Install Dependencies + run: | + rustup target add x86_64-apple-darwin + rustup target add aarch64-apple-darwin + npm install + + - name: Build Frontend + run: npm run build + + - name: Build for Intel Mac + run: | + echo "Building for x86_64..." + npm run tauri build -- --target x86_64-apple-darwin --bundles dmg + + - name: Build for Apple Silicon + run: | + echo "Building for aarch64..." + npm run tauri build -- --target aarch64-apple-darwin --bundles dmg + + - name: Upload Intel Build + uses: actions/upload-artifact@v4 + with: + name: macos-intel-build + path: src-tauri/target/x86_64-apple-darwin/release/bundle/dmg/*.dmg + + - name: Upload Apple Silicon Build + uses: actions/upload-artifact@v4 + with: + name: macos-apple-silicon-build + path: src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/*.dmg + + - name: Create Release + if: github.event_name == 'schedule' # Only create release for scheduled builds + uses: softprops/action-gh-release@v1 + with: + name: Nightly Build ${{ github.sha }} + tag_name: nightly-${{ github.sha }} + files: | + src-tauri/target/x86_64-apple-darwin/release/bundle/dmg/*.dmg + src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/*.dmg + prerelease: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/windows-nightly.yml b/.github/workflows/windows-nightly.yml new file mode 100644 index 0000000..49f5c5e --- /dev/null +++ b/.github/workflows/windows-nightly.yml @@ -0,0 +1,61 @@ +name: Windows Nightly Build + +on: + schedule: + - cron: '0 0 * * *' # Runs at 00:00 UTC every day + workflow_dispatch: # Allows manual triggering + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + name: Build Windows Executable + runs-on: windows-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 'lts/*' + cache: 'npm' + + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + + - name: Install WebView2 + run: | + $WebView2InstallPath = "$env:TEMP\MicrosoftEdgeWebview2Setup.exe" + Invoke-WebRequest "https://go.microsoft.com/fwlink/p/?LinkId=2124703" -OutFile $WebView2InstallPath + Start-Process -FilePath $WebView2InstallPath -Args "/silent /install" -Wait + + - name: Install Dependencies + run: | + npm install + + - name: Build Frontend + run: npm run build + + - name: Build Windows Executable + run: | + echo "Building Windows executable..." + npm run tauri build -- --target x86_64-pc-windows-msvc + + - name: Upload Executable + uses: actions/upload-artifact@v4 + with: + name: windows-exe + path: src-tauri/target/release/*.exe + + - name: Create Release + if: github.event_name == 'schedule' # Only create release for scheduled builds + uses: softprops/action-gh-release@v1 + with: + name: Windows Nightly Build ${{ github.sha }} + tag_name: windows-nightly-${{ github.sha }} + files: src-tauri/target/release/*.exe + prerelease: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file