diff --git a/.github/workflows/publish-browser.yml b/.github/workflows/publish-browser.yml new file mode 100644 index 000000000..864b7c969 --- /dev/null +++ b/.github/workflows/publish-browser.yml @@ -0,0 +1,147 @@ +name: Publish Browser +on: + pull_request: + workflow_dispatch: + # inputs: + # post: + # name: "Release Post" + # required: true + # description: Choose the release post to publish with. Must be a tag (eg v0.4.0) + # type: string + # channel: + # name: "CLI Binary Version" + # required: true + # description: Choose the version number to publish with. Must be a tag (ie v0.4.0) + # type: string + +env: + # make sure we have the right version + # main is always a prepatch until we hit 1.0, and then this script needs to be updated + # note that we need to promote the prepatch to a minor bump when we actually do a release + # this means the version in git will always be one minor bump ahead of the actual release - basically meaning once + # we release a version, it's fair game to merge breaking changes to main since all semver-compatible changes will be + # backported automatically + # SEMVER: ${{ github.event.inputs.channel == 'main' && 'prerelease' || 'patch' }} + # PRERELEASE_TAG: ${{ github.event.inputs.channel == 'main' && '-pre' || '' }} + RELEASE_TAG: ${{ github.event.inputs.channel }} + RELEASE_POST: ${{ github.event.inputs.post }} + +jobs: + release-cli: + permissions: + contents: write + runs-on: ${{ matrix.platform.os }} + strategy: + fail-fast: false + matrix: + platform: + - target: x86_64-pc-windows-msvc + os: windows-latest + use_git_cli: false + artifact_name: "Blitz_0.0.0_windows_x86_64" + artifact_path: | + ./target/dx/blitz/bundle/windows/bundle/msi/Blitz_0.0.0_x64_en-US.msi + ./target/dx/blitz/bundle/windows/bundle/nsis/Blitz_0.0.0_x64-setup.exe + - target: aarch64-pc-windows-msvc + os: windows-11-arm + use_git_cli: false + artifact_name: "Blitz_0.0.0_windows_aarch64" + artifact_path: | + ./target/dx/blitz/bundle/windows/bundle/msi/Blitz_0.0.0_arm64_en-US.msi + ./target/dx/blitz/bundle/windows/bundle/nsis/Blitz_0.0.0_arm64-setup.exe + - target: x86_64-apple-darwin + os: macos-15-intel + use_git_cli: false + artifact_name: "Blitz_0.0.0_macos_x86_64" + artifact_path: "./target/dx/blitz/bundle/macos/bundle/dmg/Blitz_0.0.0_x64.dmg" + - target: aarch64-apple-darwin + os: macos-latest + use_git_cli: false + artifact_name: "Blitz_0.0.0_macos_aarch64" + artifact_path: "./target/dx/blitz/bundle/macos/bundle/dmg/Blitz_0.0.0_aarch64.dmg" + - target: x86_64-unknown-linux-gnu + os: ubuntu-24.04 + use_git_cli: false + artifact_name: "Blitz_0.0.0_linux_x86_64" + artifact_path: | + ./target/dx/blitz/bundle/linux/bundle/deb/Blitz_0.0.0_amd64.deb + ./target/dx/blitz/bundle/linux/bundle/rpm/Blitz-0.0.0-.x86_64.rpm + ./target/dx/blitz/bundle/linux/bundle/appimage/Blitz_0.0.0_amd64.AppImage + - target: aarch64-unknown-linux-gnu + os: ubuntu-24.04-arm + use_git_cli: false + artifact_name: "Blitz_0.0.0_linux_aarch64" + artifact_path: | + ./target/dx/blitz/bundle/linux/bundle/deb/Blitz_0.0.arm64.deb + ./target/dx/blitz/bundle/linux/bundle/rpm/Blitz-0.0.0-.aarch64.rpm + ./target/dx/blitz/bundle/linux/bundle/appimage/Blitz_0.0.0_aarch64.AppImage + # musl builds + # - target: x86_64-unknown-linux-musl + # os: ubuntu-24.04 + # - target: aarch64-unknown-linux-musl + # os: ubuntu-24.04-arm + steps: + - name: Checkout + uses: actions/checkout@v5 + + - name: Install Rust + uses: dtolnay/rust-toolchain@master + with: + toolchain: "1.92.0" + targets: ${{ matrix.platform.target }} + + - uses: Swatinem/rust-cache@v2 + with: + cache-all-crates: "true" + save-if: ${{ github.ref == 'refs/heads/main' }} + + - name: Install Dioxus CLI + if: ${{ matrix.platform.use_git_cli == false }} + uses: taiki-e/install-action@v2 + with: + tool: dioxus-cli@0.7.3 + + - name: Install Dioxus CLI (git) + if: ${{ matrix.platform.use_git_cli == true }} + run: cargo install dioxus-cli --git https://github.com/nicoburns/dioxus.git --rev=9ff94e783eb394e3ab712a524861c536818e6661 + + # - name: Install openssl on macos + # if: ${{ matrix.platform.os == 'macos-latest' || matrix.platform.os == 'macos-15-intel' }} + # run: brew install openssl + + # - name: Install nasm for windows (tls) + # if: ${{ matrix.platform.target == 'x86_64-pc-windows-msvc' }} + # uses: ilammy/setup-nasm@v1 + + # - name: Free Disk Space + # if: ${{ matrix.platform.os == 'ubuntu-24.04' || matrix.platform.os == 'ubuntu-24.04-arm' }} + # uses: ./.github/actions/free-disk-space + + - uses: awalsh128/cache-apt-pkgs-action@latest + if: ${{ matrix.platform.os == 'ubuntu-24.04' || matrix.platform.os == 'ubuntu-24.04-arm' }} + with: + packages: libgtk-3-dev libxdo-dev libwebkit2gtk-4.1-dev build-essential curl wget file libssl-dev libayatana-appindicator3-dev librsvg2-dev + version: 1.0 + + - name: Bundle browser + run: dx bundle --package browser --profile production --locked --verbose --trace + + - name: Upload app bundle + uses: actions/upload-artifact@v5 + if: ${{ matrix.platform.artifact_path != '' && matrix.platform.artifact_name != '' }} + with: + name: ${{ matrix.platform.artifact_name }} + path: ${{ matrix.platform.artifact_path }} + + # # Todo: we want `cargo install dx` to actually just use a prebuilt binary instead of building it + # - name: Build and upload CLI binaries + # uses: taiki-e/upload-rust-binary-action@v1 + # with: + # bin: dx + # token: ${{ secrets.GITHUB_TOKEN }} + # target: ${{ matrix.platform.target }} + # archive: $bin-$target + # checksum: sha256 + # manifest_path: packages/cli/Cargo.toml + # ref: refs/tags/${{ env.RELEASE_POST }} + # zip: "all" diff --git a/apps/browser/Dioxus.toml b/apps/browser/Dioxus.toml index 0fbc25e63..140c68127 100644 --- a/apps/browser/Dioxus.toml +++ b/apps/browser/Dioxus.toml @@ -4,4 +4,8 @@ android_main_activity = "MainActivity.kt" [bundle] publisher = "DioxusLabs" identifier = "com.dioxuslabs.blitz" -icon = ["./assets/blitz-logo.png"] \ No newline at end of file +icon = ["./assets/blitz-logo.png"] + +[bundle.windows] +webview_install_mode = "Skip" +icon_path = "assets\\blitz-logo.ico" \ No newline at end of file diff --git a/apps/browser/assets/blitz-logo.ico b/apps/browser/assets/blitz-logo.ico new file mode 100644 index 000000000..8b112c22c Binary files /dev/null and b/apps/browser/assets/blitz-logo.ico differ