diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 64bba57..f0d342f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,6 +7,7 @@ on: push: tags: - v* + - '!v_gui*' env: CARGO_TERM_COLOR: always @@ -89,7 +90,7 @@ jobs: build-unix: runs-on: ${{ matrix.os }} env: - BUILD_EXTRA_FEATURES: "" + BUILD_EXTRA_FEATURES: '' RUST_BACKTRACE: full strategy: matrix: @@ -132,7 +133,7 @@ jobs: build-windows: runs-on: windows-latest env: - RUSTFLAGS: "-C target-feature=+crt-static" + RUSTFLAGS: '-C target-feature=+crt-static' RUST_BACKTRACE: full steps: - uses: actions/checkout@v3 @@ -155,4 +156,4 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: files: build/release/* - prerelease: ${{ contains(github.ref, '-') }} \ No newline at end of file + prerelease: ${{ contains(github.ref, '-') }} diff --git a/.github/workflows/release_gui.yml b/.github/workflows/release_gui.yml new file mode 100644 index 0000000..89fba5d --- /dev/null +++ b/.github/workflows/release_gui.yml @@ -0,0 +1,64 @@ +name: Build GUI release + +permissions: + contents: write + +on: + push: + tags: + - v_gui.* + +jobs: + create_release: + runs-on: ubuntu-latest + outputs: + changes: ${{ steps.changelog_reader.outputs.changes }} + version: ${{ steps.changelog_reader.outputs.VERSION }} + steps: + - uses: actions/checkout@v3 + - name: Get version number + run: | + VERSION=${{github.ref_name}} + echo "VERSION=${VERSION/v_gui\./}" >> $GITHUB_ENV + - name: Changelog Reader + id: changelog_reader + uses: mindsers/changelog-reader-action@v2.2.2 + with: + path: './crates/gui/CHANGELOG.md' + version: ${{ env.VERSION }} + + build_seam: + needs: create_release + strategy: + matrix: + platform: [macos-latest, ubuntu-latest, windows-latest] + runs-on: ${{ matrix.platform }} + steps: + - uses: actions/checkout@v3 + - name: Set up node + uses: actions/setup-node@v3 + with: + node-version: 18 + cache: 'yarn' + cache-dependency-path: 'crates/gui/yarn.lock' + - name: Install Rust stable + uses: dtolnay/rust-toolchain@stable + - name: install dependencies (ubuntu only) + if: matrix.platform == 'ubuntu-latest' + run: | + sudo apt-get update + sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf + - name: install frontend dependencies + run: | + cd crates/gui + yarn install --frozen-lockfile + - uses: tauri-apps/tauri-action@v0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + projectPath: 'crates/gui' + tagName: ${{ needs.create_release.outputs.version }} + releaseName: 'Seam ${{ needs.create_release.outputs.version }}' + releaseBody: '${{ needs.create_release.outputs.changes }}' + releaseDraft: false + prerelease: false diff --git a/crates/gui/src-tauri/src/main.rs b/crates/gui/src-tauri/src/main.rs index 7d583bd..17157d5 100644 --- a/crates/gui/src-tauri/src/main.rs +++ b/crates/gui/src-tauri/src/main.rs @@ -21,8 +21,10 @@ async fn url(live: String, rid: String) -> Resp { async fn main() { tauri::Builder::default() .setup(|app| { - let window = app.get_window("main").unwrap(); - set_shadow(&window, true).expect("Unsupported platform!"); + if cfg!(any(target_os = "macos", target_os = "windows")) { + let window = app.get_window("main").unwrap(); + set_shadow(&window, true).expect("Unknow error in the macos or windows platform"); + } Ok(()) }) .invoke_handler(tauri::generate_handler![url])