diff --git a/.github/actions/javascript/postTestBuildComment/index.js b/.github/actions/javascript/postTestBuildComment/index.js index 679f6cf9508b..c2d486b325bb 100644 --- a/.github/actions/javascript/postTestBuildComment/index.js +++ b/.github/actions/javascript/postTestBuildComment/index.js @@ -35,12 +35,12 @@ function getTestBuildMessage() { const iOSQRCode = iOSSuccess ? `![iOS](https://api.qrserver.com/v1/create-qr-code/?size=120x120&data=${iOSLink})` : "The QR code can't be generated, because the iOS build failed"; const webQRCode = webSuccess ? `![Web](https://api.qrserver.com/v1/create-qr-code/?size=120x120&data=${webLink})` : "The QR code can't be generated, because the web build failed"; - const message = `:test_tube::test_tube: Use the links below to test this build in android and iOS. Happy testing! :test_tube::test_tube: -| android :robot: | iOS :apple: | + const message = `:test_tube::test_tube: Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! :test_tube::test_tube: +| Android :robot: | iOS :apple: | | ------------- | ------------- | | ${androidLink} | ${iOSLink} | | ${androidQRCode} | ${iOSQRCode} | -| desktop :computer: | web :spider_web: | +| Desktop :computer: | Web :spider_web: | | ${desktopLink} | ${webLink} | | ${desktopQRCode} | ${webQRCode} |`; diff --git a/.github/actions/javascript/postTestBuildComment/postTestBuildComment.js b/.github/actions/javascript/postTestBuildComment/postTestBuildComment.js index ea086e9657ac..4bb43f6e5900 100644 --- a/.github/actions/javascript/postTestBuildComment/postTestBuildComment.js +++ b/.github/actions/javascript/postTestBuildComment/postTestBuildComment.js @@ -26,12 +26,12 @@ function getTestBuildMessage() { const iOSQRCode = iOSSuccess ? `![iOS](https://api.qrserver.com/v1/create-qr-code/?size=120x120&data=${iOSLink})` : "The QR code can't be generated, because the iOS build failed"; const webQRCode = webSuccess ? `![Web](https://api.qrserver.com/v1/create-qr-code/?size=120x120&data=${webLink})` : "The QR code can't be generated, because the web build failed"; - const message = `:test_tube::test_tube: Use the links below to test this build in android and iOS. Happy testing! :test_tube::test_tube: -| android :robot: | iOS :apple: | + const message = `:test_tube::test_tube: Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! :test_tube::test_tube: +| Android :robot: | iOS :apple: | | ------------- | ------------- | | ${androidLink} | ${iOSLink} | | ${androidQRCode} | ${iOSQRCode} | -| desktop :computer: | web :spider_web: | +| Desktop :computer: | Web :spider_web: | | ${desktopLink} | ${webLink} | | ${desktopQRCode} | ${webQRCode} |`; diff --git a/.github/workflows/platformDeploy.yml b/.github/workflows/platformDeploy.yml index d18a0a383ed6..f30d55c4dff4 100644 --- a/.github/workflows/platformDeploy.yml +++ b/.github/workflows/platformDeploy.yml @@ -154,7 +154,7 @@ jobs: - name: Build production desktop app if: ${{ fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }} - run: npm run desktop-build -- --publish always + run: npm run desktop-build env: CSC_LINK: ${{ secrets.CSC_LINK }} CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} @@ -165,7 +165,7 @@ jobs: - name: Build staging desktop app if: ${{ !fromJSON(env.SHOULD_DEPLOY_PRODUCTION) }} - run: npm run desktop-build-staging -- --publish always + run: npm run desktop-build-staging env: CSC_LINK: ${{ secrets.CSC_LINK }} CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} diff --git a/.github/workflows/testBuild.yml b/.github/workflows/testBuild.yml index beb5d4e2f530..b79b687e638e 100644 --- a/.github/workflows/testBuild.yml +++ b/.github/workflows/testBuild.yml @@ -246,7 +246,7 @@ jobs: AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - name: Build desktop app for testing - run: npm run desktop-build-adhoc -- --publish always + run: npm run desktop-build-adhoc env: CSC_LINK: ${{ secrets.CSC_LINK }} CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} @@ -339,7 +339,7 @@ jobs: if: ${{ fromJSON(needs.validateActor.outputs.READY_TO_BUILD) }} with: token: ${{ secrets.OS_BOTIFY_TOKEN }} - body-include: 'Use the links below to test this build in android and iOS. Happy testing!' + body-include: 'Use the links below to test this adhoc build in Android, iOS, Desktop, and Web. Happy testing!' number: ${{ github.event.number || github.event.inputs.PULL_REQUEST_NUMBER }} delete: true diff --git a/config/electronBuilder.config.js b/config/electronBuilder.config.js index da87c93ee367..e4ed685f65fe 100644 --- a/config/electronBuilder.config.js +++ b/config/electronBuilder.config.js @@ -1,6 +1,5 @@ const {version} = require('../package.json'); -const isPublishing = process.argv.includes('--publish'); const pullRequestNumber = process.env.PULL_REQUEST_NUMBER; const s3Bucket = { @@ -28,8 +27,7 @@ if (!isCorrectElectronEnv) { } /** - * The configuration for the production and staging Electron builds. - * It can be used to create local builds of the same, by omitting the `--publish` flag + * The configuration for the debug, production and staging Electron builds. */ module.exports = { appId: 'com.expensifyreactnative.chat', @@ -44,6 +42,9 @@ module.exports = { entitlements: 'desktop/entitlements.mac.plist', entitlementsInherit: 'desktop/entitlements.mac.plist', type: 'distribution', + notarize: { + teamId: '368M544MTT', + }, }, dmg: { title: 'New Expensify', @@ -58,7 +59,6 @@ module.exports = { path: s3Path[process.env.ELECTRON_ENV], }, ], - afterSign: isPublishing ? './desktop/notarize.js' : undefined, files: ['dist', '!dist/www/{.well-known,favicon*}'], directories: { app: 'desktop', diff --git a/contributingGuides/APPLE_GOOGLE_SIGNIN.md b/contributingGuides/APPLE_GOOGLE_SIGNIN.md index 3ade13554bd6..43485a28b353 100644 --- a/contributingGuides/APPLE_GOOGLE_SIGNIN.md +++ b/contributingGuides/APPLE_GOOGLE_SIGNIN.md @@ -233,7 +233,7 @@ If developing on MacOS, the development desktop app can't handle deeplinks corre 1. Create a "real" build of the desktop app, which can handle deep links, open the build folder, and install the dmg there: ``` -npm run desktop-build --publish=never +npm run desktop-build open desktop-build # Then double-click "NewExpensify.dmg" in Finder window ``` diff --git a/desktop/notarize.js b/desktop/notarize.js deleted file mode 100644 index f6f803700a19..000000000000 --- a/desktop/notarize.js +++ /dev/null @@ -1,20 +0,0 @@ -const {notarize} = require('@electron/notarize'); -const electron = require('../config/electronBuilder.config'); - -exports.default = function notarizing(context) { - const {electronPlatformName, appOutDir} = context; - if (electronPlatformName !== 'darwin') { - return; - } - - const appName = context.packager.appInfo.productFilename; - - return notarize({ - tool: 'notarytool', - appBundleId: electron.appId, - appPath: `${appOutDir}/${appName}.app`, - appleId: process.env.APPLE_ID, - appleIdPassword: process.env.APPLE_APP_SPECIFIC_PASSWORD, - teamId: '368M544MTT', - }); -}; diff --git a/package-lock.json b/package-lock.json index f4b6b93eeb98..b7481266d5ce 100644 --- a/package-lock.json +++ b/package-lock.json @@ -137,7 +137,7 @@ "@babel/preset-typescript": "^7.21.5", "@babel/runtime": "^7.20.0", "@dword-design/eslint-plugin-import-alias": "^4.0.8", - "@electron/notarize": "^1.2.3", + "@electron/notarize": "^2.1.0", "@jest/globals": "^29.5.0", "@octokit/core": "4.0.4", "@octokit/plugin-paginate-rest": "3.1.0", @@ -3104,13 +3104,14 @@ } }, "node_modules/@electron/notarize": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@electron/notarize/-/notarize-1.2.3.tgz", - "integrity": "sha512-9oRzT56rKh5bspk3KpAVF8lPKHYQrBnRwcgiOeR0hdilVEQmszDaAu0IPCPrwwzJN0ugNs0rRboTreHMt/6mBQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@electron/notarize/-/notarize-2.1.0.tgz", + "integrity": "sha512-Q02xem1D0sg4v437xHgmBLxI2iz/fc0D4K7fiVWHa/AnW8o7D751xyKNXgziA6HrTOme9ul1JfWN5ark8WH1xA==", "dev": true, "dependencies": { "debug": "^4.1.1", - "fs-extra": "^9.0.1" + "fs-extra": "^9.0.1", + "promise-retry": "^2.0.1" }, "engines": { "node": ">= 10.0.0" @@ -21725,35 +21726,6 @@ "node": ">=14.0.0" } }, - "node_modules/app-builder-lib/node_modules/@electron/notarize": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@electron/notarize/-/notarize-2.1.0.tgz", - "integrity": "sha512-Q02xem1D0sg4v437xHgmBLxI2iz/fc0D4K7fiVWHa/AnW8o7D751xyKNXgziA6HrTOme9ul1JfWN5ark8WH1xA==", - "dev": true, - "dependencies": { - "debug": "^4.1.1", - "fs-extra": "^9.0.1", - "promise-retry": "^2.0.1" - }, - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/app-builder-lib/node_modules/@electron/notarize/node_modules/fs-extra": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", - "dev": true, - "dependencies": { - "at-least-node": "^1.0.0", - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/app-builder-lib/node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -55354,13 +55326,14 @@ } }, "@electron/notarize": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@electron/notarize/-/notarize-1.2.3.tgz", - "integrity": "sha512-9oRzT56rKh5bspk3KpAVF8lPKHYQrBnRwcgiOeR0hdilVEQmszDaAu0IPCPrwwzJN0ugNs0rRboTreHMt/6mBQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@electron/notarize/-/notarize-2.1.0.tgz", + "integrity": "sha512-Q02xem1D0sg4v437xHgmBLxI2iz/fc0D4K7fiVWHa/AnW8o7D751xyKNXgziA6HrTOme9ul1JfWN5ark8WH1xA==", "dev": true, "requires": { "debug": "^4.1.1", - "fs-extra": "^9.0.1" + "fs-extra": "^9.0.1", + "promise-retry": "^2.0.1" } }, "@electron/osx-sign": { @@ -68793,31 +68766,6 @@ "temp-file": "^3.4.0" }, "dependencies": { - "@electron/notarize": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@electron/notarize/-/notarize-2.1.0.tgz", - "integrity": "sha512-Q02xem1D0sg4v437xHgmBLxI2iz/fc0D4K7fiVWHa/AnW8o7D751xyKNXgziA6HrTOme9ul1JfWN5ark8WH1xA==", - "dev": true, - "requires": { - "debug": "^4.1.1", - "fs-extra": "^9.0.1", - "promise-retry": "^2.0.1" - }, - "dependencies": { - "fs-extra": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", - "dev": true, - "requires": { - "at-least-node": "^1.0.0", - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - } - } - } - }, "argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", diff --git a/package.json b/package.json index 3eefcc2cc3a4..24c8a5f0c8e3 100644 --- a/package.json +++ b/package.json @@ -186,7 +186,7 @@ "@babel/preset-react": "^7.10.4", "@babel/preset-typescript": "^7.21.5", "@babel/runtime": "^7.20.0", - "@electron/notarize": "^1.2.3", + "@electron/notarize": "^2.1.0", "@jest/globals": "^29.5.0", "@octokit/core": "4.0.4", "@octokit/plugin-paginate-rest": "3.1.0", diff --git a/tests/unit/postTestBuildComment.js b/tests/unit/postTestBuildComment.js index 23c52f934a39..fb1d1572dc34 100644 --- a/tests/unit/postTestBuildComment.js +++ b/tests/unit/postTestBuildComment.js @@ -26,12 +26,12 @@ const desktopQRCode = `![Desktop](https://api.qrserver.com/v1/create-qr-code/?si const iOSQRCode = `![iOS](https://api.qrserver.com/v1/create-qr-code/?size=120x120&data=${iOSLink})`; const webQRCode = `![Web](https://api.qrserver.com/v1/create-qr-code/?size=120x120&data=${webLink})`; -const message = `:test_tube::test_tube: Use the links below to test this build in android and iOS. Happy testing! :test_tube::test_tube: -| android :robot: | iOS :apple: | +const message = `:test_tube::test_tube: Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! :test_tube::test_tube: +| Android :robot: | iOS :apple: | | ------------- | ------------- | | ${androidLink} | ${iOSLink} | | ${androidQRCode} | ${iOSQRCode} | -| desktop :computer: | web :spider_web: | +| Desktop :computer: | Web :spider_web: | | ${desktopLink} | ${webLink} | | ${desktopQRCode} | ${webQRCode} |`;