From e7c675b838c1bc98445a00d2994e5c68cefe2fbc Mon Sep 17 00:00:00 2001 From: marc2332 Date: Tue, 6 Feb 2024 14:09:28 +0100 Subject: [PATCH 1/3] fix: Fix macOS Notarization --- .../workflows/build-and-release-desktop.yml | 4 ++-- .github/workflows/build-desktop-test.v1.yml | 4 ++-- .github/workflows/build-desktop-test.v2.yml | 4 ++-- .github/workflows/build-desktop.yml | 4 ++-- packages/desktop/scripts/notarize.macos.js | 23 +------------------ 5 files changed, 9 insertions(+), 30 deletions(-) diff --git a/.github/workflows/build-and-release-desktop.yml b/.github/workflows/build-and-release-desktop.yml index 919d6e45db7..feb727c3365 100644 --- a/.github/workflows/build-and-release-desktop.yml +++ b/.github/workflows/build-and-release-desktop.yml @@ -143,8 +143,8 @@ jobs: env: CSC_LINK: ${{ secrets.MAC_CERT_BASE64 }} CSC_KEY_PASSWORD: ${{ secrets.MAC_CERT_PASSWORD }} - FIREFLY_APPLE_ID: ${{ secrets.APPLE_ID }} - FIREFLY_APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} + APPLE_ID: ${{ secrets.APPLE_ID }} + APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} working-directory: packages/desktop if: matrix.os == 'macos-11' diff --git a/.github/workflows/build-desktop-test.v1.yml b/.github/workflows/build-desktop-test.v1.yml index d9935167728..7376868642d 100644 --- a/.github/workflows/build-desktop-test.v1.yml +++ b/.github/workflows/build-desktop-test.v1.yml @@ -128,8 +128,8 @@ jobs: env: CSC_LINK: ${{ secrets.MAC_CERT_BASE64 }} CSC_KEY_PASSWORD: ${{ secrets.MAC_CERT_PASSWORD }} - FIREFLY_APPLE_ID: ${{ secrets.APPLE_ID }} - FIREFLY_APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} + APPLE_ID: ${{ secrets.APPLE_ID }} + APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} working-directory: packages/desktop if: matrix.os == 'macos-11' diff --git a/.github/workflows/build-desktop-test.v2.yml b/.github/workflows/build-desktop-test.v2.yml index 5e30d3c1ebb..77f91e98f97 100644 --- a/.github/workflows/build-desktop-test.v2.yml +++ b/.github/workflows/build-desktop-test.v2.yml @@ -97,8 +97,8 @@ jobs: env: CSC_LINK: ${{ secrets.MAC_CERT_BASE64 }} CSC_KEY_PASSWORD: ${{ secrets.MAC_CERT_PASSWORD }} - FIREFLY_APPLE_ID: ${{ secrets.APPLE_ID }} - FIREFLY_APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} + APPLE_ID: ${{ secrets.APPLE_ID }} + APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} working-directory: packages/desktop if: matrix.os == 'macos-11' diff --git a/.github/workflows/build-desktop.yml b/.github/workflows/build-desktop.yml index 82d752c3973..43b2d890f42 100644 --- a/.github/workflows/build-desktop.yml +++ b/.github/workflows/build-desktop.yml @@ -112,8 +112,8 @@ jobs: env: CSC_LINK: ${{ secrets.MAC_CERT_BASE64 }} CSC_KEY_PASSWORD: ${{ secrets.MAC_CERT_PASSWORD }} - FIREFLY_APPLE_ID: ${{ secrets.APPLE_ID }} - FIREFLY_APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} + APPLE_ID: ${{ secrets.APPLE_ID }} + APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} working-directory: packages/desktop if: matrix.os == 'macos-11' diff --git a/packages/desktop/scripts/notarize.macos.js b/packages/desktop/scripts/notarize.macos.js index 96ba130c4d8..de173e1e378 100644 --- a/packages/desktop/scripts/notarize.macos.js +++ b/packages/desktop/scripts/notarize.macos.js @@ -1,30 +1,9 @@ -const path = require('path') - -/** - * - * @param {string} appName - * @returns void - */ -module.exports = async (appName) => { +module.exports = async () => { if (process.platform !== 'darwin' || process.env.MACOS_SKIP_NOTARIZATION) { return undefined } - const APPLE_ID = process.env.FIREFLY_APPLE_ID - const APPLE_ID_PASSWORD = process.env.FIREFLY_APPLE_ID_PASSWORD - - if (!APPLE_ID) { - throw Error('Notarization failed: Environment variable "FIREFLY_APPLE_ID" is not defined') - } - - if (!APPLE_ID_PASSWORD) { - throw Error('Notarization failed: Environment variable "FIREFLY_APPLE_ID_PASSWORD" is not defined') - } - return { - appPath: path.resolve(__dirname, `../out/mac/${appName}.app`), - appleId: APPLE_ID, - appleIdPassword: APPLE_ID_PASSWORD, teamId: 'UG77RJKZHH', } } From 99f54a9b170f09d8360d75071205e6c98d5c4184 Mon Sep 17 00:00:00 2001 From: marc2332 Date: Tue, 6 Feb 2024 14:20:13 +0100 Subject: [PATCH 2/3] I hate js --- packages/desktop/scripts/notarize.macos.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/desktop/scripts/notarize.macos.js b/packages/desktop/scripts/notarize.macos.js index de173e1e378..69a7be31c3d 100644 --- a/packages/desktop/scripts/notarize.macos.js +++ b/packages/desktop/scripts/notarize.macos.js @@ -1,4 +1,4 @@ -module.exports = async () => { +module.exports = () => { if (process.platform !== 'darwin' || process.env.MACOS_SKIP_NOTARIZATION) { return undefined } From cb7880fa3069dcdede149f861891a14e51d807dc Mon Sep 17 00:00:00 2001 From: marc2332 Date: Tue, 6 Feb 2024 14:34:51 +0100 Subject: [PATCH 3/3] fix workflow --- .github/workflows/build-desktop.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-desktop.yml b/.github/workflows/build-desktop.yml index 43b2d890f42..e29e4098ee7 100644 --- a/.github/workflows/build-desktop.yml +++ b/.github/workflows/build-desktop.yml @@ -140,31 +140,31 @@ jobs: if: matrix.os == 'ubuntu-20.04' - name: Sign AppImage (Linux) - run: echo $GPG_PASSPHRASE | gpg --pinentry-mode loopback --batch --passphrase-fd 0 --armor --detach-sign --default-key contact@iota.org firefly-desktop*.AppImage + run: echo $GPG_PASSPHRASE | gpg --pinentry-mode loopback --batch --passphrase-fd 0 --armor --detach-sign --default-key contact@iota.org firefly-shimmer-desktop*.AppImage working-directory: packages/desktop/out env: GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} if: matrix.os == 'ubuntu-20.04' - name: Compute checksums (Linux) - run: for i in `ls | grep 'firefly-desktop*'` ; do sha256sum $i | awk {'print $1'} > $i.sha256 ; done + run: for i in `ls | grep 'firefly-shimmer-desktop*'` ; do sha256sum $i | awk {'print $1'} > $i.sha256 ; done working-directory: packages/desktop/out if: matrix.os == 'ubuntu-20.04' - name: Compute checksums (macOS) - run: for i in `ls | grep 'firefly-desktop*'` ; do shasum -a 256 $i | awk {'print $1'} > $i.sha256 ; done + run: for i in `ls | grep 'firefly-shimmer-desktop*'` ; do shasum -a 256 $i | awk {'print $1'} > $i.sha256 ; done working-directory: packages/desktop/out if: matrix.os == 'macos-11' - name: Compute checksums (Windows) - run: Get-ChildItem "." -Filter firefly-desktop* | Foreach-Object { $(Get-FileHash -Path $_.FullName -Algorithm SHA256).Hash | Set-Content ($_.FullName + '.sha256') } + run: Get-ChildItem "." -Filter firefly-shimmer-desktop* | Foreach-Object { $(Get-FileHash -Path $_.FullName -Algorithm SHA256).Hash | Set-Content ($_.FullName + '.sha256') } working-directory: packages/desktop/out if: matrix.os == 'windows-2019' - name: Upload artifacts uses: actions/upload-artifact@v2 with: - name: firefly-desktop-${{ matrix.os }} + name: firefly-shimmer-desktop-${{ matrix.os }} path: | - packages/desktop/out/firefly-desktop* + packages/desktop/out/firefly-shimmer-desktop* packages/desktop/out/shimmer*