diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4a26eda..1e3ab08 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,7 +14,39 @@ env: TAURI_CLI_VERSION: "1.0.3" jobs: + tauri-release-config: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: false + path: ${{ env.SOURCE_PATH }} + - name: Install jq + if: startsWith(github.ref, 'refs/tags/v') + run: | + sudo apt-get -y update + sudo apt-get -y install jq + - name: Populate tauri release configuration + if: startsWith(github.ref, 'refs/tags/v') + shell: bash + run: > + jq + --null-input + --arg version "${GITHUB_REF##*/v}" + -f release.conf.jq + > "${{ github.workspace }}/tauri.release.conf.json" + working-directory: ${{ env.SOURCE_PATH }}/src-tauri + - name: Create empty tauri release configuration + if: startsWith(github.ref, 'refs/tags/v') != true + shell: bash + run: echo "{}" > "${{ github.workspace }}/tauri.release.conf.json" + - uses: actions/upload-artifact@v3 + with: + name: tauri.release.conf.json + path: "${{ github.workspace }}/tauri.release.conf.json" + tauri-build: + needs: [ tauri-release-config ] strategy: fail-fast: false matrix: @@ -60,9 +92,16 @@ jobs: run: trunk build --release --dist "./../src-tauri/websrc" if: runner.os == 'Windows' working-directory: "${{ env.SOURCE_PATH }}/cube_shuffle-wasm" + - name: Download release configuration + uses: actions/download-artifact@v3 + with: + name: tauri.release.conf.json + path: "${{ env.SOURCE_PATH }}/src-tauri" - name: Tauri Build - run: cargo tauri build ${{ runner.os == 'macOS' && '--target universal-apple-darwin' || '' }} || true + run: cargo tauri build ${{ runner.os == 'macOS' && '--target universal-apple-darwin' || '' }} --config "./tauri.release.conf.json" working-directory: "${{ env.SOURCE_PATH }}/src-tauri" + env: + TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} - uses: actions/upload-artifact@v3 name: Tauri Linux executable @@ -366,7 +405,7 @@ jobs: sudo apt-get -y install jq - name: Make update json run: | - jq -n \ + jq --null-input \ --arg version "${GITHUB_REF##*/v}" \ --arg tag_version "${GITHUB_REF##*/}" \ --arg now `date --iso-8601=ns` \ diff --git a/Cargo.lock b/Cargo.lock index b29923f..2ef1b3d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -83,24 +83,6 @@ dependencies = [ "system-deps 6.0.2", ] -[[package]] -name = "attohttpc" -version = "0.19.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "262c3f7f5d61249d8c00e5546e2685cd15ebeeb1bc0f3cc5449350a1cb07319e" -dependencies = [ - "flate2", - "http", - "log", - "native-tls", - "openssl", - "serde", - "serde_json", - "serde_urlencoded", - "url", - "wildmatch", -] - [[package]] name = "atty" version = "0.2.14" @@ -719,19 +701,6 @@ version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f107b87b6afc2a64fd13cac55fe06d6c8859f12d4b14cbcdd2c67d0976781be" -[[package]] -name = "embed-resource" -version = "1.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc24ff8d764818e9ab17963b0593c535f077a513f565e75e4352d758bc4d8c0" -dependencies = [ - "cc", - "rustc_version 0.4.0", - "toml", - "vswhom", - "winreg", -] - [[package]] name = "embed_plist" version = "1.2.2" @@ -1776,12 +1745,6 @@ dependencies = [ "autocfg", ] -[[package]] -name = "minisign-verify" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "933dca44d65cdd53b355d0b73d380a2ff5da71f87f036053188bf1eab6a19881" - [[package]] name = "miniz_oxide" version = "0.5.3" @@ -1791,24 +1754,6 @@ dependencies = [ "adler", ] -[[package]] -name = "native-tls" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd7e2f3618557f980e0b17e8856252eee3c97fa12c54dff0ca290fb6266ca4a9" -dependencies = [ - "lazy_static", - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - [[package]] name = "ndk" version = "0.6.0" @@ -1940,17 +1885,6 @@ dependencies = [ "objc_exception", ] -[[package]] -name = "objc-foundation" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1add1b659e36c9607c7aab864a76c7a4c2760cd0cd2e120f3fb8b952c7e22bf9" -dependencies = [ - "block", - "objc", - "objc_id", -] - [[package]] name = "objc_exception" version = "0.1.2" @@ -1985,51 +1919,6 @@ dependencies = [ "windows-sys", ] -[[package]] -name = "openssl" -version = "0.10.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb81a6430ac911acb25fe5ac8f1d2af1b4ea8a4fdfda0f1ee4292af2e2d8eb0e" -dependencies = [ - "bitflags", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "openssl-probe" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" - -[[package]] -name = "openssl-sys" -version = "0.9.74" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835363342df5fba8354c5b453325b110ffd54044e588c539cf2f20a8014e4cb1" -dependencies = [ - "autocfg", - "cc", - "libc", - "pkg-config", - "vcpkg", -] - [[package]] name = "os_str_bytes" version = "6.1.0" @@ -2608,31 +2497,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "rfd" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f121348fd3b9035ed11be1f028e8944263c30641f8c5deacf57a4320782fb402" -dependencies = [ - "block", - "dispatch", - "embed-resource", - "glib-sys", - "gobject-sys", - "gtk-sys", - "js-sys", - "lazy_static", - "log", - "objc", - "objc-foundation", - "objc_id", - "raw-window-handle", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "windows", -] - [[package]] name = "rustc_version" version = "0.3.3" @@ -2690,16 +2554,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "schannel" -version = "0.1.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" -dependencies = [ - "lazy_static", - "windows-sys", -] - [[package]] name = "scoped-tls" version = "1.0.0" @@ -2712,29 +2566,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" -[[package]] -name = "security-framework" -version = "2.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dc14f172faf8a0194a3aded622712b0de276821addc574fa54fc0a1167e10dc" -dependencies = [ - "bitflags", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "selectors" version = "0.22.0" @@ -3161,8 +2992,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d61fc211e0bd2c04c0aecd202d2cd72dd797a89da02989a39e1b9691462386d6" dependencies = [ "anyhow", - "attohttpc", - "base64", "cocoa", "dirs-next", "embed_plist", @@ -3175,7 +3004,6 @@ dependencies = [ "heck 0.4.0", "http", "ignore", - "minisign-verify", "objc", "once_cell", "open", @@ -3183,7 +3011,6 @@ dependencies = [ "rand 0.8.5", "raw-window-handle", "regex", - "rfd", "semver 1.0.12", "serde", "serde_json", @@ -3197,14 +3024,12 @@ dependencies = [ "tauri-utils", "tempfile", "thiserror", - "time", "tokio", "url", "uuid 1.1.2", "webkit2gtk", "webview2-com", "windows", - "zip", ] [[package]] @@ -3631,12 +3456,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - [[package]] name = "version-compare" version = "0.0.11" @@ -3655,26 +3474,6 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "vswhom" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be979b7f07507105799e854203b470ff7c78a1639e330a58f183b5fea574608b" -dependencies = [ - "libc", - "vswhom-sys", -] - -[[package]] -name = "vswhom-sys" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22025f6d8eb903ebf920ea6933b70b1e495be37e2cb4099e62c80454aaf57c39" -dependencies = [ - "cc", - "libc", -] - [[package]] name = "wait-timeout" version = "0.2.0" @@ -3875,12 +3674,6 @@ dependencies = [ "windows-bindgen", ] -[[package]] -name = "wildmatch" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee583bdc5ff1cf9db20e9db5bb3ff4c3089a8f6b8b31aff265c9aba85812db86" - [[package]] name = "winapi" version = "0.3.9" @@ -4031,15 +3824,6 @@ version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4dd6dc7df2d84cf7b33822ed5b86318fb1781948e9663bacd047fc9dd52259d" -[[package]] -name = "winreg" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" -dependencies = [ - "winapi", -] - [[package]] name = "winres" version = "0.1.12" @@ -4162,14 +3946,3 @@ dependencies = [ "quote", "syn", ] - -[[package]] -name = "zip" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf225bcf73bb52cbb496e70475c7bd7a3f769df699c0020f6c7bd9a96dcf0b8d" -dependencies = [ - "byteorder", - "crc32fast", - "crossbeam-utils", -] diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index bc40ca3..5d5cf6e 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -15,7 +15,7 @@ tauri-build = { version = "1.0.3", features = [] } [dependencies] serde_json = "^1.0" serde = { version = "^1.0", features = ["derive"] } -tauri = { version = "1.0.3", features = ["shell-open", "updater"] } +tauri = { version = "1.0.3", features = ["shell-open"] } [features] default = [ "custom-protocol" ] diff --git a/src-tauri/release.conf.jq b/src-tauri/release.conf.jq new file mode 100644 index 0000000..a58bf0c --- /dev/null +++ b/src-tauri/release.conf.jq @@ -0,0 +1,15 @@ +{ + "package": { + "version": $version + }, + "tauri": { + "updater": { + "active": true, + "dialog": true, + "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEVGODExQThBRDk3NkE1OEEKUldTS3BYYlppaHFCNzZCWVVWVnN0b1U4Rm1iWHl5dDJvS2hSRVVQemVRNGI3Z0NUaVlXcDJTSk0K", + "endpoints": [ + "https://github.com/philipborg/CubeShuffle/releases/latest/download/update_info.json" + ] + } + } +} diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 69af1ed..8b75cc2 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "package": { "productName": "CubeShuffle", - "version": "0.1.0" + "version": "0.0.0-development" }, "build": { "distDir": "websrc", @@ -44,12 +44,7 @@ } }, "updater": { - "active": true, - "dialog": true, - "pubkey": "", - "endpoints": [ - "https://github.com/philipborg/CubeShuffle/releases/latest/download/update_info.json" - ] + "active": false }, "allowlist": { "all": false,