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

Fix wrong Provisioning Profile and add directories to desktop upload #13129

Merged
merged 9 commits into from
Dec 1, 2022
13 changes: 6 additions & 7 deletions .github/workflows/testBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ jobs:
postGithubComment:
runs-on: ubuntu-latest
name: Post a GitHub comment with app download links for testing
needs: [android, ios]
needs: [android, ios, desktop]
steps:
- name: Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
Expand All @@ -190,11 +190,10 @@ jobs:
- name: Publish links to apps for download
run: |
gh pr comment --body \
"Use the links below to test this build in android and iOS. Happy testing!
| android :robot: | iOS :apple: |
| ------------- | ------------- |
| ${{fromJson(steps.set_var.outputs.android_paths).html_path}} | ${{fromJson(steps.set_var.outputs.ios_paths).html_path}} |
| ------------- | ------------- |
| ![Android](https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=${{fromJson(steps.set_var.outputs.android_paths).html_path}}) | ![iOS](https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=${{fromJson(steps.set_var.outputs.ios_paths).html_path}}) |"
":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: | desktop :computer: |
| ------------- | ------------- | ------------- |
| ${{fromJson(steps.set_var.outputs.android_paths).html_path}} | ${{fromJson(steps.set_var.outputs.ios_paths).html_path}} | https://ad-hoc-expensify-cash.us-east-1.amazonaws.com/desktop/${{github.event.number}}/NewExpensify.dmg
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| ${{fromJson(steps.set_var.outputs.android_paths).html_path}} | ${{fromJson(steps.set_var.outputs.ios_paths).html_path}} | https://ad-hoc-expensify-cash.us-east-1.amazonaws.com/desktop/${{github.event.number}}/NewExpensify.dmg
| ${{fromJson(steps.set_var.outputs.android_paths).html_path}} | ${{fromJson(steps.set_var.outputs.ios_paths).html_path}} | https://ad-hoc-expensify-cash.us-east-1.amazonaws.com/desktop/${{github.event.number}}/NewExpensify.dmg |

| ![Android](https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=${{fromJson(steps.set_var.outputs.android_paths).html_path}}) | ![iOS](https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=${{fromJson(steps.set_var.outputs.ios_paths).html_path}}) | ![desktop](https://ad-hoc-expensify-cash.us-east-1.amazonaws.com/desktop/${{github.event.number}}/NewExpensify.dmg)"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| ![Android](https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=${{fromJson(steps.set_var.outputs.android_paths).html_path}}) | ![iOS](https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=${{fromJson(steps.set_var.outputs.ios_paths).html_path}}) | ![desktop](https://ad-hoc-expensify-cash.us-east-1.amazonaws.com/desktop/${{github.event.number}}/NewExpensify.dmg)"
| ![Android](https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=${{fromJson(steps.set_var.outputs.android_paths).html_path}}) | ![iOS](https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=${{fromJson(steps.set_var.outputs.ios_paths).html_path}}) | ![desktop](https://ad-hoc-expensify-cash.us-east-1.amazonaws.com/desktop/${{github.event.number}}/NewExpensify.dmg)" |

I don't think this is technically required, but let's be sure to add it in the next PR please

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, good catch, I haven't noticed this one! The fix is here: #13321

env:
GITHUB_TOKEN: ${{ secrets.OS_BOTIFY_TOKEN }}
14 changes: 3 additions & 11 deletions config/electronBuilder.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ const macIcon = {
internal: './desktop/icon-stg.png',
};

const isCorrectElectronEnv = ['production', 'staging', 'internal'].includes(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NAB but let's actually throw an error if we find that process.env.ELECTRON_ENV is not on of these?

process.env.ELECTRON_ENV,
);

/**
* 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
Expand All @@ -39,9 +35,7 @@ module.exports = {
},
mac: {
category: 'public.app-category.finance',
icon: isCorrectElectronEnv
? macIcon[process.env.ELECTRON_ENV]
: './desktop/icon-stg.png',
icon: macIcon[process.env.ELECTRON_ENV],
hardenedRuntime: true,
entitlements: 'desktop/entitlements.mac.plist',
entitlementsInherit: 'desktop/entitlements.mac.plist',
Expand All @@ -55,11 +49,9 @@ module.exports = {
publish: [
{
provider: 's3',
bucket: isCorrectElectronEnv
? s3Bucket[process.env.ELECTRON_ENV]
: 'ad-hoc-expensify-cash',
bucket: s3Bucket[process.env.ELECTRON_ENV],
channel: 'latest',
path: isCorrectElectronEnv ? s3Path[process.env.ELECTRON_ENV] : '/',
path: s3Path[process.env.ELECTRON_ENV],
},
],
afterSign: isPublishing ? './desktop/notarize.js' : undefined,
Expand Down