Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hotfix: macOS notarization #7995

Merged
merged 3 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build-and-release-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-desktop-test.v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-desktop-test.v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/build-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -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 [email protected] firefly-desktop*.AppImage
run: echo $GPG_PASSPHRASE | gpg --pinentry-mode loopback --batch --passphrase-fd 0 --armor --detach-sign --default-key [email protected] 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*
23 changes: 1 addition & 22 deletions packages/desktop/scripts/notarize.macos.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,9 @@
const path = require('path')

/**
*
* @param {string} appName
* @returns void
*/
module.exports = async (appName) => {
module.exports = () => {
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',
}
}
Loading