From 2f619fe9fe3a5ea8a5bf67bcc6eecd4882730136 Mon Sep 17 00:00:00 2001 From: Rigidity Date: Fri, 20 Sep 2024 12:25:21 -0400 Subject: [PATCH 01/30] MacOS build --- .github/workflows/build.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1ab67cfb..2ec20ea0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,10 +38,20 @@ jobs: - name: Fmt run: cargo fmt --all -- --files-with-diff --check - build: - runs-on: ubuntu-latest + build-macos: + runs-on: macos-latest steps: - name: Checkout uses: actions/checkout@v4 - uses: pnpm/action-setup@v4 + + - name: Bundle + run: CI=true pnpm tauri build --ci + + - uses: actions/upload-artifact@v4 + with: + name: macos + path: | + ./target/aarch64-apple-darwin/release/bundle/macos/*.app + ./target/aarch64-apple-darwin/release/bundle/dmg/*.dmg From 918c0638929a36131859e9efbfca65b3e3a1a919 Mon Sep 17 00:00:00 2001 From: Rigidity Date: Fri, 20 Sep 2024 12:27:18 -0400 Subject: [PATCH 02/30] Install --- .github/workflows/build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2ec20ea0..4ee7974e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,6 +46,9 @@ jobs: - uses: pnpm/action-setup@v4 + - name: Install + run: pnpm install + - name: Bundle run: CI=true pnpm tauri build --ci From fb971c02a3e0eaa5576611c63f0fbcaf7e954d8d Mon Sep 17 00:00:00 2001 From: Rigidity Date: Fri, 20 Sep 2024 12:30:07 -0400 Subject: [PATCH 03/30] Add names to jobs --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4ee7974e..8612776e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,6 +16,7 @@ concurrency: jobs: lint: + name: Lint runs-on: ubuntu-latest steps: - name: Checkout @@ -39,6 +40,7 @@ jobs: run: cargo fmt --all -- --files-with-diff --check build-macos: + name: MacOS Bundle runs-on: macos-latest steps: - name: Checkout From c390bfb9aa16826a6cb8c20da09f0328ab1d57c0 Mon Sep 17 00:00:00 2001 From: Rigidity Date: Fri, 20 Sep 2024 13:09:09 -0400 Subject: [PATCH 04/30] Signing attempt 1 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8612776e..43ea208e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -52,7 +52,7 @@ jobs: run: pnpm install - name: Bundle - run: CI=true pnpm tauri build --ci + run: CI=true pnpm tauri build - uses: actions/upload-artifact@v4 with: From 633f355341fb292e5519790200d1cfea70a8570c Mon Sep 17 00:00:00 2001 From: Rigidity Date: Fri, 20 Sep 2024 13:23:23 -0400 Subject: [PATCH 05/30] Tauri action --- .github/workflows/build.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 43ea208e..ddc7bf2b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -51,12 +51,16 @@ jobs: - name: Install run: pnpm install - - name: Bundle - run: CI=true pnpm tauri build - - - uses: actions/upload-artifact@v4 + - uses: tauri-apps/tauri-action@v0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} + APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} + CI: true with: - name: macos - path: | - ./target/aarch64-apple-darwin/release/bundle/macos/*.app - ./target/aarch64-apple-darwin/release/bundle/dmg/*.dmg + 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 }} From 26aadd13104fba96cca2a5acae4cd0e6243b72e3 Mon Sep 17 00:00:00 2001 From: Rigidity Date: Fri, 20 Sep 2024 13:38:41 -0400 Subject: [PATCH 06/30] Permission write --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ddc7bf2b..ea07ccac 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,6 +42,8 @@ jobs: build-macos: name: MacOS Bundle runs-on: macos-latest + permissions: + contents: write steps: - name: Checkout uses: actions/checkout@v4 From bebdac9201676ef7f88db269540ca56b35207939 Mon Sep 17 00:00:00 2001 From: Rigidity Date: Fri, 20 Sep 2024 13:43:03 -0400 Subject: [PATCH 07/30] Add API key --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ea07ccac..f344c9e1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -58,6 +58,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} + APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }} CI: true with: tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version. From 3d8e6f4cf023c192da17236302a7252af54af852 Mon Sep 17 00:00:00 2001 From: Rigidity Date: Fri, 20 Sep 2024 13:43:11 -0400 Subject: [PATCH 08/30] Add API key --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f344c9e1..0de40191 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -59,6 +59,7 @@ jobs: APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }} + APPLE_API_KEY: ${{ secrets.APPLE_API_KEY }} CI: true with: tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version. From f930563a16755f21a4171c49efb8ad342dd5044f Mon Sep 17 00:00:00 2001 From: Rigidity Date: Fri, 20 Sep 2024 13:57:58 -0400 Subject: [PATCH 09/30] API key path --- .github/workflows/build.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0de40191..95620c4a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -53,13 +53,16 @@ jobs: - name: Install run: pnpm install + - name: Save API key to file + run: echo ${{ secrets.APPLE_API_KEY }} > ./apple-api-key.p8 + - uses: tauri-apps/tauri-action@v0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }} - APPLE_API_KEY: ${{ secrets.APPLE_API_KEY }} + APPLE_API_KEY_PATH: ./apple-api-key.p8 CI: true with: tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version. From 08476d704fec5ba4766ba299ee4105f1383b830f Mon Sep 17 00:00:00 2001 From: Rigidity Date: Fri, 20 Sep 2024 14:01:07 -0400 Subject: [PATCH 10/30] sanitize --- .github/workflows/build.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 95620c4a..bf4500ca 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -54,7 +54,10 @@ jobs: run: pnpm install - name: Save API key to file - run: echo ${{ secrets.APPLE_API_KEY }} > ./apple-api-key.p8 + run: 'echo "$APPLE_API_KEY" > apple-api-key.p8' + shell: bash + env: + APPLE_API_KEY: ${{ secrets.APPLE_API_KEY }} - uses: tauri-apps/tauri-action@v0 env: From 29e030d68545661fdbb52e799f4e0b877e875b03 Mon Sep 17 00:00:00 2001 From: Rigidity Date: Fri, 20 Sep 2024 14:12:31 -0400 Subject: [PATCH 11/30] Fix key --- .github/workflows/build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bf4500ca..4680a394 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -54,10 +54,10 @@ jobs: run: pnpm install - name: Save API key to file - run: 'echo "$APPLE_API_KEY" > apple-api-key.p8' + run: 'echo "$APPLE_API_SECRET_KEY" > apple-api-key.p8' shell: bash env: - APPLE_API_KEY: ${{ secrets.APPLE_API_KEY }} + APPLE_API_KEY: ${{ secrets.APPLE_API_SECRET_KEY }} - uses: tauri-apps/tauri-action@v0 env: @@ -65,6 +65,7 @@ jobs: APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }} + APPLE_API_KEY: ${{ secrets.APPLE_API_KEY_ID }} APPLE_API_KEY_PATH: ./apple-api-key.p8 CI: true with: From 5b810258110e180f030a75a2ef1837c3464ab31e Mon Sep 17 00:00:00 2001 From: Rigidity Date: Fri, 20 Sep 2024 14:20:23 -0400 Subject: [PATCH 12/30] github.workspace --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4680a394..addd19e7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -54,7 +54,7 @@ jobs: run: pnpm install - name: Save API key to file - run: 'echo "$APPLE_API_SECRET_KEY" > apple-api-key.p8' + run: 'echo "$APPLE_API_SECRET_KEY" > ${{ github.workspace }}/apple-api-key.p8' shell: bash env: APPLE_API_KEY: ${{ secrets.APPLE_API_SECRET_KEY }} @@ -66,7 +66,7 @@ jobs: APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }} APPLE_API_KEY: ${{ secrets.APPLE_API_KEY_ID }} - APPLE_API_KEY_PATH: ./apple-api-key.p8 + APPLE_API_KEY_PATH: ${{ github.workspace }}/apple-api-key.p8 CI: true with: tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version. From 9da30a90690e5db4cbe0a9a25ba8733b26b51401 Mon Sep 17 00:00:00 2001 From: Rigidity Date: Sat, 21 Sep 2024 09:54:30 -0400 Subject: [PATCH 13/30] Product name thing --- src-tauri/tauri.conf.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index f4e45522..aac09566 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,5 +1,5 @@ { - "productName": "sage", + "productName": "Sage", "version": "0.1.0", "identifier": "com.rigidnetwork.sage", "build": { From cda63f853f0bc8c73b318c6139bcb05e4c56a8e1 Mon Sep 17 00:00:00 2001 From: Rigidity Date: Sat, 21 Sep 2024 09:58:07 -0400 Subject: [PATCH 14/30] no newline --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index addd19e7..fc8d6073 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -54,7 +54,7 @@ jobs: run: pnpm install - name: Save API key to file - run: 'echo "$APPLE_API_SECRET_KEY" > ${{ github.workspace }}/apple-api-key.p8' + run: 'echo -n "$APPLE_API_SECRET_KEY" > ${{ github.workspace }}/apple-api-key.p8' shell: bash env: APPLE_API_KEY: ${{ secrets.APPLE_API_SECRET_KEY }} From 985c46edc25a1edd10f257719c37cec435b2f700 Mon Sep 17 00:00:00 2001 From: Rigidity Date: Sat, 21 Sep 2024 11:48:55 -0400 Subject: [PATCH 15/30] sha256sum --- .github/workflows/build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fc8d6073..46e55d2d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -59,6 +59,9 @@ jobs: env: APPLE_API_KEY: ${{ secrets.APPLE_API_SECRET_KEY }} + - name: Print sha256sum + run: sha256sum ${{ github.workspace }}/apple-api-key.p8 + - uses: tauri-apps/tauri-action@v0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From dfdb3b599f5332e5963da9cfea49bad14c75b237 Mon Sep 17 00:00:00 2001 From: Rigidity Date: Sat, 21 Sep 2024 11:50:18 -0400 Subject: [PATCH 16/30] coreutils --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 46e55d2d..abf897f4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -60,7 +60,7 @@ jobs: APPLE_API_KEY: ${{ secrets.APPLE_API_SECRET_KEY }} - name: Print sha256sum - run: sha256sum ${{ github.workspace }}/apple-api-key.p8 + run: sudo apt-get install --reinstall coreutils && sha256sum ${{ github.workspace }}/apple-api-key.p8 - uses: tauri-apps/tauri-action@v0 env: From 0f271a9ec41f97a804c165fb30d26f70c3132f25 Mon Sep 17 00:00:00 2001 From: Rigidity Date: Sat, 21 Sep 2024 11:51:30 -0400 Subject: [PATCH 17/30] This is mac --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index abf897f4..9d671d73 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -60,7 +60,7 @@ jobs: APPLE_API_KEY: ${{ secrets.APPLE_API_SECRET_KEY }} - name: Print sha256sum - run: sudo apt-get install --reinstall coreutils && sha256sum ${{ github.workspace }}/apple-api-key.p8 + run: brew install coreutils && sha256sum ${{ github.workspace }}/apple-api-key.p8 - uses: tauri-apps/tauri-action@v0 env: From 9a3fbaa528ca1f3324d54734c94d479810559ca9 Mon Sep 17 00:00:00 2001 From: Rigidity Date: Sat, 21 Sep 2024 12:00:36 -0400 Subject: [PATCH 18/30] Try to fix the key --- .github/workflows/build.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9d671d73..8410bed9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -54,13 +54,10 @@ jobs: run: pnpm install - name: Save API key to file - run: 'echo -n "$APPLE_API_SECRET_KEY" > ${{ github.workspace }}/apple-api-key.p8' - shell: bash - env: - APPLE_API_KEY: ${{ secrets.APPLE_API_SECRET_KEY }} + run: echo -n '${{ secrets.APPLE_API_SECRET_KEY }}' > ~/private_keys/AuthKey_${{ secrets.APPLE_API_KEY_ID }}.p8 - name: Print sha256sum - run: brew install coreutils && sha256sum ${{ github.workspace }}/apple-api-key.p8 + run: brew install coreutils && sha256sum ~/private_keys/AuthKey_${{ secrets.APPLE_API_KEY_ID }}.p8 - uses: tauri-apps/tauri-action@v0 env: @@ -69,7 +66,7 @@ jobs: APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }} APPLE_API_KEY: ${{ secrets.APPLE_API_KEY_ID }} - APPLE_API_KEY_PATH: ${{ github.workspace }}/apple-api-key.p8 + APPLE_API_KEY_PATH: ~/private_keys/AuthKey_${{ secrets.APPLE_API_KEY_ID }}.p8 CI: true with: tagName: app-v__VERSION__ # the action automatically replaces \_\_VERSION\_\_ with the app version. From 631aad9e4c4e17fabed802bb877df680bc83b12e Mon Sep 17 00:00:00 2001 From: Rigidity Date: Sat, 21 Sep 2024 12:02:12 -0400 Subject: [PATCH 19/30] mkdir --- .github/workflows/build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8410bed9..805a5dc2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -54,7 +54,9 @@ jobs: run: pnpm install - name: Save API key to file - run: echo -n '${{ secrets.APPLE_API_SECRET_KEY }}' > ~/private_keys/AuthKey_${{ secrets.APPLE_API_KEY_ID }}.p8 + run: | + mkdir -p ~/private_keys + echo -n '${{ secrets.APPLE_API_SECRET_KEY }}' > ~/private_keys/AuthKey_${{ secrets.APPLE_API_KEY_ID }}.p8 - name: Print sha256sum run: brew install coreutils && sha256sum ~/private_keys/AuthKey_${{ secrets.APPLE_API_KEY_ID }}.p8 From 6ac1b4d5e9f810abd9751eb4a2a7533d7f743827 Mon Sep 17 00:00:00 2001 From: Rigidity Date: Sat, 21 Sep 2024 13:16:45 -0400 Subject: [PATCH 20/30] Windows too --- .github/workflows/build.yml | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 805a5dc2..4abcab9e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -58,9 +58,6 @@ jobs: mkdir -p ~/private_keys echo -n '${{ secrets.APPLE_API_SECRET_KEY }}' > ~/private_keys/AuthKey_${{ secrets.APPLE_API_KEY_ID }}.p8 - - name: Print sha256sum - run: brew install coreutils && sha256sum ~/private_keys/AuthKey_${{ secrets.APPLE_API_KEY_ID }}.p8 - - uses: tauri-apps/tauri-action@v0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -77,3 +74,29 @@ jobs: releaseDraft: true prerelease: false args: ${{ matrix.args }} + + build-windows: + name: Windows Bundle + runs-on: windows-latest + permissions: + contents: write + steps: + - name: Checkout + uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v4 + + - name: Install + run: pnpm install + + - uses: tauri-apps/tauri-action@v0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CI: true + with: + 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 }} From 6b2f0077e6cd619cafa4b3262134d33145697c31 Mon Sep 17 00:00:00 2001 From: Rigidity Date: Sat, 21 Sep 2024 13:17:51 -0400 Subject: [PATCH 21/30] Add if to macos --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4abcab9e..ed725b1b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,6 +42,7 @@ jobs: build-macos: name: MacOS Bundle runs-on: macos-latest + if: startsWith(github.event.ref, 'refs/tags/v') permissions: contents: write steps: From 12d394c80f5a874e92a369539784c1eb27ec54a3 Mon Sep 17 00:00:00 2001 From: Rigidity Date: Sat, 21 Sep 2024 13:25:03 -0400 Subject: [PATCH 22/30] Add Rust setup --- .github/workflows/build.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ed725b1b..70abf57d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -49,7 +49,8 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - uses: pnpm/action-setup@v4 + - name: Install pnpm + uses: pnpm/action-setup@v4 - name: Install run: pnpm install @@ -85,7 +86,11 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - uses: pnpm/action-setup@v4 + - name: Setup Rust + uses: dtolnay/rust-toolchain@stable + + - name: Install pnpm + uses: pnpm/action-setup@v4 - name: Install run: pnpm install From 2ed91b960f651de6ef633492d8433973ee6f4676 Mon Sep 17 00:00:00 2001 From: Rigidity Date: Sat, 21 Sep 2024 13:25:21 -0400 Subject: [PATCH 23/30] nvm --- .github/workflows/build.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 70abf57d..707804d3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -86,9 +86,6 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Setup Rust - uses: dtolnay/rust-toolchain@stable - - name: Install pnpm uses: pnpm/action-setup@v4 From 0f077444a1bea1b7a48b9b8c1e1f46198e5ba63d Mon Sep 17 00:00:00 2001 From: Rigidity Date: Sun, 22 Sep 2024 08:36:08 -0400 Subject: [PATCH 24/30] Rev --- Cargo.lock | 16 ++++++++-------- Cargo.toml | 2 +- src-tauri/src/commands/transactions.rs | 9 +++++---- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e649ce06..d726159a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -741,7 +741,7 @@ dependencies = [ [[package]] name = "chia-sdk-client" version = "0.14.0" -source = "git+https://github.com/Rigidity/chia-wallet-sdk?branch=sage#7f26f975f8f7a59d94bbed02dd1113ba731a35db" +source = "git+https://github.com/xch-dev/chia-wallet-sdk?rev=1461c0e77d687b73b59e440044ad6c7d35c49581#1461c0e77d687b73b59e440044ad6c7d35c49581" dependencies = [ "chia-protocol", "chia-sdk-types", @@ -761,7 +761,7 @@ dependencies = [ [[package]] name = "chia-sdk-derive" version = "0.14.0" -source = "git+https://github.com/Rigidity/chia-wallet-sdk?branch=sage#7f26f975f8f7a59d94bbed02dd1113ba731a35db" +source = "git+https://github.com/xch-dev/chia-wallet-sdk?rev=1461c0e77d687b73b59e440044ad6c7d35c49581#1461c0e77d687b73b59e440044ad6c7d35c49581" dependencies = [ "convert_case 0.6.0", "quote", @@ -771,7 +771,7 @@ dependencies = [ [[package]] name = "chia-sdk-driver" version = "0.14.0" -source = "git+https://github.com/Rigidity/chia-wallet-sdk?branch=sage#7f26f975f8f7a59d94bbed02dd1113ba731a35db" +source = "git+https://github.com/xch-dev/chia-wallet-sdk?rev=1461c0e77d687b73b59e440044ad6c7d35c49581#1461c0e77d687b73b59e440044ad6c7d35c49581" dependencies = [ "chia-bls 0.13.0", "chia-protocol", @@ -789,7 +789,7 @@ dependencies = [ [[package]] name = "chia-sdk-offers" version = "0.14.0" -source = "git+https://github.com/Rigidity/chia-wallet-sdk?branch=sage#7f26f975f8f7a59d94bbed02dd1113ba731a35db" +source = "git+https://github.com/xch-dev/chia-wallet-sdk?rev=1461c0e77d687b73b59e440044ad6c7d35c49581#1461c0e77d687b73b59e440044ad6c7d35c49581" dependencies = [ "bech32", "chia-bls 0.13.0", @@ -810,7 +810,7 @@ dependencies = [ [[package]] name = "chia-sdk-signer" version = "0.14.0" -source = "git+https://github.com/Rigidity/chia-wallet-sdk?branch=sage#7f26f975f8f7a59d94bbed02dd1113ba731a35db" +source = "git+https://github.com/xch-dev/chia-wallet-sdk?rev=1461c0e77d687b73b59e440044ad6c7d35c49581#1461c0e77d687b73b59e440044ad6c7d35c49581" dependencies = [ "chia-bls 0.13.0", "chia-consensus", @@ -824,7 +824,7 @@ dependencies = [ [[package]] name = "chia-sdk-test" version = "0.14.0" -source = "git+https://github.com/Rigidity/chia-wallet-sdk?branch=sage#7f26f975f8f7a59d94bbed02dd1113ba731a35db" +source = "git+https://github.com/xch-dev/chia-wallet-sdk?rev=1461c0e77d687b73b59e440044ad6c7d35c49581#1461c0e77d687b73b59e440044ad6c7d35c49581" dependencies = [ "anyhow", "bip39", @@ -855,7 +855,7 @@ dependencies = [ [[package]] name = "chia-sdk-types" version = "0.14.0" -source = "git+https://github.com/Rigidity/chia-wallet-sdk?branch=sage#7f26f975f8f7a59d94bbed02dd1113ba731a35db" +source = "git+https://github.com/xch-dev/chia-wallet-sdk?rev=1461c0e77d687b73b59e440044ad6c7d35c49581#1461c0e77d687b73b59e440044ad6c7d35c49581" dependencies = [ "chia-bls 0.13.0", "chia-consensus", @@ -906,7 +906,7 @@ dependencies = [ [[package]] name = "chia-wallet-sdk" version = "0.14.0" -source = "git+https://github.com/Rigidity/chia-wallet-sdk?branch=sage#7f26f975f8f7a59d94bbed02dd1113ba731a35db" +source = "git+https://github.com/xch-dev/chia-wallet-sdk?rev=1461c0e77d687b73b59e440044ad6c7d35c49581#1461c0e77d687b73b59e440044ad6c7d35c49581" dependencies = [ "bech32", "chia-protocol", diff --git a/Cargo.toml b/Cargo.toml index e9a0fb63..cd2fff00 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -71,7 +71,7 @@ tauri-specta = "=2.0.0-rc.18" # Chia chia = "0.13.0" clvmr = "0.8.0" -chia-wallet-sdk = { git = "https://github.com/Rigidity/chia-wallet-sdk", branch = "sage" } +chia-wallet-sdk = { git = "https://github.com/xch-dev/chia-wallet-sdk", rev = "1461c0e77d687b73b59e440044ad6c7d35c49581" } bip39 = "2.0.0" bech32 = "0.9.1" diff --git a/src-tauri/src/commands/transactions.rs b/src-tauri/src/commands/transactions.rs index 8bc23175..ac9eba80 100644 --- a/src-tauri/src/commands/transactions.rs +++ b/src-tauri/src/commands/transactions.rs @@ -9,7 +9,8 @@ use chia::{ puzzles::DeriveSynthetic, }; use chia_wallet_sdk::{ - decode_address, Peer, RequiredSignature, MAINNET_CONSTANTS, TESTNET11_CONSTANTS, + decode_address, AggSigConstants, Peer, RequiredSignature, MAINNET_CONSTANTS, + TESTNET11_CONSTANTS, }; use clvmr::Allocator; use sage_api::Amount; @@ -258,10 +259,10 @@ async fn transact( let required_signatures = RequiredSignature::from_coin_spends( &mut Allocator::new(), &coin_spends, - if state.config.network.network_id == "mainnet" { - &MAINNET_CONSTANTS + &if state.config.network.network_id == "mainnet" { + AggSigConstants::new(MAINNET_CONSTANTS.agg_sig_me_additional_data) } else { - &TESTNET11_CONSTANTS + AggSigConstants::new(TESTNET11_CONSTANTS.agg_sig_me_additional_data) }, )?; From aab52cda6be32daa718c4f3ae37e94365852c205 Mon Sep 17 00:00:00 2001 From: Rigidity Date: Sun, 22 Sep 2024 08:47:20 -0400 Subject: [PATCH 25/30] Remove target file --- src-tauri/.cargo/config.toml | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 src-tauri/.cargo/config.toml diff --git a/src-tauri/.cargo/config.toml b/src-tauri/.cargo/config.toml deleted file mode 100644 index 886913ab..00000000 --- a/src-tauri/.cargo/config.toml +++ /dev/null @@ -1,4 +0,0 @@ -[build] -target = "aarch64-apple-darwin" - -[target] From 07a298ccd6a4ae4c25b66a9e6750bd11b99ec9e6 Mon Sep 17 00:00:00 2001 From: Rigidity Date: Sun, 22 Sep 2024 09:05:56 -0400 Subject: [PATCH 26/30] Nasm --- .github/workflows/build.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 707804d3..a4372ea7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -86,6 +86,11 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Install nasm + run: | + choco install nasm + echo "C:\Program Files\NASM" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + - name: Install pnpm uses: pnpm/action-setup@v4 From 06ef0e54627941e5a4ad6d143e0673104d05776d Mon Sep 17 00:00:00 2001 From: Rigidity Date: Sun, 22 Sep 2024 09:45:55 -0400 Subject: [PATCH 27/30] Add release workflow --- .github/workflows/build.yml | 88 +++++++++++++++++++------------------ 1 file changed, 46 insertions(+), 42 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a4372ea7..a5292ea1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,72 +39,76 @@ jobs: - name: Fmt run: cargo fmt --all -- --files-with-diff --check - build-macos: + build: name: MacOS Bundle runs-on: macos-latest if: startsWith(github.event.ref, 'refs/tags/v') permissions: contents: write + strategy: + fail-fast: false + matrix: + include: + - platform: 'macos-latest' + args: '--target aarch64-apple-darwin' + - platform: 'macos-latest' + args: '--target x86_64-apple-darwin' + - platform: 'ubuntu-22.04' + args: '' + - platform: 'windows-latest' + args: '' steps: - name: Checkout uses: actions/checkout@v4 + - name: Get release + id: get_release + uses: actions/github-script@v6 + with: + script: | + const tag = process.env.GITHUB_REF.split('/').pop(); + const release = await github.rest.repos.getReleaseByTag({ + owner: context.repo.owner, + repo: context.repo.repo, + tag: tag, + }); + return release.data.id; + + - name: Ubuntu dependencies + if: matrix.platform == 'ubuntu-22.04' + run: sudo apt-get install -y libgtk-3-dev libjavascriptcoregtk-4.1-dev libwebkit2gtk-4.1-dev + + - name: Windows dependencies + if: matrix.platform == 'windows-latest' + run: | + choco install nasm + echo "C:\Program Files\NASM" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + - name: Install pnpm uses: pnpm/action-setup@v4 - - name: Install + - name: Frontend dependencies run: pnpm install - name: Save API key to file + if: matrix.platform == 'macos-latest' run: | mkdir -p ~/private_keys echo -n '${{ secrets.APPLE_API_SECRET_KEY }}' > ~/private_keys/AuthKey_${{ secrets.APPLE_API_KEY_ID }}.p8 - - uses: tauri-apps/tauri-action@v0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} - APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} - APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }} - APPLE_API_KEY: ${{ secrets.APPLE_API_KEY_ID }} - APPLE_API_KEY_PATH: ~/private_keys/AuthKey_${{ secrets.APPLE_API_KEY_ID }}.p8 - CI: true - with: - 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 }} - - build-windows: - name: Windows Bundle - runs-on: windows-latest - permissions: - contents: write - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install nasm + - name: Apple signing variables + if: matrix.platform == 'macos-latest' run: | - choco install nasm - echo "C:\Program Files\NASM" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append - - - name: Install pnpm - uses: pnpm/action-setup@v4 - - - name: Install - run: pnpm install + echo "APPLE_CERTIFICATE=${{ secrets.APPLE_CERTIFICATE }}" >> $GITHUB_ENV + echo "APPLE_CERTIFICATE_PASSWORD=${{ secrets.APPLE_CERTIFICATE_PASSWORD }}" >> $GITHUB_ENV + echo "APPLE_API_ISSUER=${{ secrets.APPLE_API_ISSUER }}" >> $GITHUB_ENV + echo "APPLE_API_KEY=${{ secrets.APPLE_API_KEY_ID }}" >> $GITHUB_ENV + echo "APPLE_API_KEY_PATH=~/private_keys/AuthKey_${{ secrets.APPLE_API_KEY_ID }}.p8" >> $GITHUB_ENV - uses: tauri-apps/tauri-action@v0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CI: true with: - 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 + releaseId: ${{ steps.get_release.outputs.result }} args: ${{ matrix.args }} From 0141888847145a22bc43352332c4eb58651ba623 Mon Sep 17 00:00:00 2001 From: Rigidity Date: Sun, 22 Sep 2024 09:51:04 -0400 Subject: [PATCH 28/30] Dry run --- .github/workflows/build.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a5292ea1..9fbfb253 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,9 +40,8 @@ jobs: run: cargo fmt --all -- --files-with-diff --check build: - name: MacOS Bundle - runs-on: macos-latest - if: startsWith(github.event.ref, 'refs/tags/v') + name: Bundle ${{ matrix.platform_name }} + runs-on: ${{ matrix.platform }} permissions: contents: write strategy: @@ -50,18 +49,23 @@ jobs: matrix: include: - platform: 'macos-latest' + platform_name: MacOS ARM64 args: '--target aarch64-apple-darwin' - platform: 'macos-latest' + platform_name: MacOS x86_64 args: '--target x86_64-apple-darwin' - platform: 'ubuntu-22.04' + platform_name: Linux args: '' - platform: 'windows-latest' + platform_name: Windows args: '' steps: - name: Checkout uses: actions/checkout@v4 - name: Get release + if: startsWith(github.event.ref, 'refs/tags/v') id: get_release uses: actions/github-script@v6 with: @@ -105,7 +109,13 @@ jobs: echo "APPLE_API_KEY=${{ secrets.APPLE_API_KEY_ID }}" >> $GITHUB_ENV echo "APPLE_API_KEY_PATH=~/private_keys/AuthKey_${{ secrets.APPLE_API_KEY_ID }}.p8" >> $GITHUB_ENV - - uses: tauri-apps/tauri-action@v0 + - name: Dry run + if: ${{ !startsWith(github.event.ref, 'refs/tags/v') }} + run: pnpm tauri build ${{ matrix.args }} + + - name: Publish + uses: tauri-apps/tauri-action@v0 + if: ${{ startsWith(github.event.ref, 'refs/tags/v') }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CI: true From 7118ab724a7158b6afbcf3b68e838ab4172f9434 Mon Sep 17 00:00:00 2001 From: Rigidity Date: Sun, 22 Sep 2024 09:52:41 -0400 Subject: [PATCH 29/30] Only use keys on publish --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9fbfb253..b8eb512d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -95,13 +95,13 @@ jobs: run: pnpm install - name: Save API key to file - if: matrix.platform == 'macos-latest' + if: ${{ matrix.platform == 'macos-latest' && startsWith(github.event.ref, 'refs/tags/v') }} run: | mkdir -p ~/private_keys echo -n '${{ secrets.APPLE_API_SECRET_KEY }}' > ~/private_keys/AuthKey_${{ secrets.APPLE_API_KEY_ID }}.p8 - name: Apple signing variables - if: matrix.platform == 'macos-latest' + if: ${{ matrix.platform == 'macos-latest' && startsWith(github.event.ref, 'refs/tags/v') }} run: | echo "APPLE_CERTIFICATE=${{ secrets.APPLE_CERTIFICATE }}" >> $GITHUB_ENV echo "APPLE_CERTIFICATE_PASSWORD=${{ secrets.APPLE_CERTIFICATE_PASSWORD }}" >> $GITHUB_ENV From 7065dd8726b5df4ee3e1a2ee0ea86c6afe48e043 Mon Sep 17 00:00:00 2001 From: Rigidity Date: Sun, 22 Sep 2024 09:54:39 -0400 Subject: [PATCH 30/30] x64 target --- .github/workflows/build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b8eb512d..87aba1c1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -78,6 +78,10 @@ jobs: }); return release.data.id; + - name: Install x86_64-apple-darwin target + if: matrix.platform_name == 'MacOS x86_64' + run: rustup target add x86_64-apple-darwin + - name: Ubuntu dependencies if: matrix.platform == 'ubuntu-22.04' run: sudo apt-get install -y libgtk-3-dev libjavascriptcoregtk-4.1-dev libwebkit2gtk-4.1-dev