Skip to content

Commit

Permalink
🔧 (electron) release electron app to app store (osx) (actualbudget#2182)
Browse files Browse the repository at this point in the history
  • Loading branch information
MatissJanis authored Jan 9, 2024
1 parent 37366c2 commit 808d44a
Show file tree
Hide file tree
Showing 15 changed files with 140 additions and 137 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/electron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ jobs:
uses: ./.github/actions/setup
- name: Build Electron
run: ./bin/package-electron
env:
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
CSC_LINK: ${{ secrets.CSC_LINK }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
- name: Upload Build
uses: actions/upload-artifact@v3
with:
Expand Down
2 changes: 2 additions & 0 deletions .secret-tokens.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export [email protected]
export APPLE_APP_SPECIFIC_PASSWORD=password
7 changes: 2 additions & 5 deletions bin/package-electron
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

ROOT=`dirname $0`
RELEASE=""
RELEASE_NOTES="" # TODO: figure out automation for release notes when we start publishing electron versions
CI=${CI:-false}

cd "$ROOT/.."
Expand Down Expand Up @@ -47,15 +46,13 @@ yarn workspace desktop-electron update-client
cd packages/desktop-electron;
yarn clean;

export npm_config_better_sqlite3_binary_host="https://static.actualbudget.com/prebuild/better-sqlite3"

if [ "$RELEASE" == "production" ]; then
if [ -f ../../.secret-tokens ]; then
source ../../.secret-tokens
fi
yarn build --publish always -c.releaseInfo.releaseNotes="$RELEASE_NOTES" --arm64 --x64
yarn build --publish never --arm64 --x64

echo "\nCreated release with release notes \"$RELEASE_NOTES\""
echo "\nCreated release"
else
SKIP_NOTARIZATION=true yarn build --publish never --x64
fi
Expand Down
2 changes: 1 addition & 1 deletion packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"test": "yarn run build:app && jest -c jest.config.js"
},
"dependencies": {
"better-sqlite3": "^9.1.1",
"better-sqlite3": "^9.2.2",
"compare-versions": "^6.1.0",
"node-fetch": "^3.3.2",
"uuid": "^9.0.0"
Expand Down
7 changes: 4 additions & 3 deletions packages/desktop-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,15 @@ First start the dev server:
```sh
HTTPS=true yarn start
```

Next, navigate to the root of your project folder, run the standartised docker container, and launch the visual regression tests from within it.

```sh
# Run docker container
docker run --rm --network host -v $(pwd):/work/ -w /work/ -it mcr.microsoft.com/playwright:v1.37.0-jammy /bin/bash
docker run --rm --network host -v $(pwd):/work/ -w /work/ -it mcr.microsoft.com/playwright:v1.37.1-jammy /bin/bash

# If you recieve an error such as "docker: invalid reference format", please instead use the following command:
docker run --rm --network host -v ${pwd}:/work/ -w /work/ -it mcr.microsoft.com/playwright:v1.37.0-jammy /bin/bash
# If you receive an error such as "docker: invalid reference format", please instead use the following command:
docker run --rm --network host -v ${pwd}:/work/ -w /work/ -it mcr.microsoft.com/playwright:v1.37.1-jammy /bin/bash

# Run the VRT tests: important - they MUST be ran against a HTTPS server
E2E_START_URL=https://192.168.0.178:3001 yarn vrt
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 16 additions & 5 deletions packages/desktop-client/src/components/manager/WelcomeScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ export function WelcomeScreen() {
</Paragraph>
<Paragraph style={{ color: theme.pageTextLight }}>
Get started by importing an existing budget file from Actual or
another budgeting app, or start fresh with an empty budget. You can
always create or import another budget later.
another budgeting app, create a demo budget file, or start fresh with
an empty budget. You can always create or import another budget later.
</Paragraph>
</View>
<View
Expand All @@ -63,9 +63,20 @@ export function WelcomeScreen() {
}}
>
<Button onClick={() => pushModal('import')}>Import my budget</Button>
<Button type="primary" onClick={() => createBudget()}>
Start fresh
</Button>
<View
style={{
flexDirection: 'row',
justifyContent: 'space-between',
gap: 10,
}}
>
<Button onClick={() => createBudget({ testMode: true })}>
View demo
</Button>
<Button type="primary" onClick={() => createBudget()}>
Start fresh
</Button>
</View>
</View>
</View>
);
Expand Down
1 change: 0 additions & 1 deletion packages/desktop-electron/about/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ root.innerHTML = `
<div id="success"></div>
<div id="error"></div>
</div>
<div style="color:rgba(0, 0, 0, .45)">&copy; 2020 Shift Reset LLC</div>
`;

const container = root.querySelector('#container');
Expand Down
44 changes: 0 additions & 44 deletions packages/desktop-electron/afterSignHook.js

This file was deleted.

2 changes: 1 addition & 1 deletion packages/desktop-electron/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ function updateMenu(isBudgetOpen) {
}
}

app.setAppUserModelId('com.shiftreset.actual');
app.setAppUserModelId('com.actualbudget.actual');

app.on('ready', async () => {
// Install an `app://` protocol that always returns the base HTML
Expand Down
22 changes: 13 additions & 9 deletions packages/desktop-electron/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "desktop-electron",
"author": "Actual",
"productName": "Actual",
"description": "A simple and powerful personal finance system",
"version": "24.1.0",
Expand All @@ -11,7 +12,7 @@
},
"main": "index.js",
"build": {
"appId": "com.shiftreset.actual",
"appId": "com.actualbudget.actual",
"files": [
"!node_modules/loot-core/src{,/**/*}",
"!node_modules/loot-core/lib-dist/{browser,bundle.mobile*}",
Expand All @@ -23,15 +24,18 @@
],
"publish": {
"provider": "github",
"repo": "releases",
"repo": "actual",
"owner": "actualbudget",
"vPrefixedTagName": false
"vPrefixedTagName": true
},
"mac": {
"category": "public.app-category.finance",
"icon": "icons/icon.icns",
"hardenedRuntime": true,
"gatekeeperAssess": false
"gatekeeperAssess": false,
"notarize": {
"teamId": "79ANZ983YF"
}
},
"linux": {
"target": "AppImage",
Expand All @@ -45,16 +49,16 @@
"dependencies": {
"electron-is-dev": "2.0.0",
"electron-log": "4.4.8",
"electron-updater": "6.1.4",
"electron-updater": "6.1.7",
"loot-core": "*",
"node-fetch": "^2.6.9",
"promise-retry": "^2.0.1"
},
"devDependencies": {
"@electron/notarize": "2.1.0",
"@electron/rebuild": "3.3.0",
"@electron/notarize": "2.2.0",
"@electron/rebuild": "3.4.1",
"cross-env": "^7.0.3",
"electron": "26.2.0",
"electron-builder": "24.6.4"
"electron": "27.2.0",
"electron-builder": "24.10.0"
}
}
2 changes: 1 addition & 1 deletion packages/loot-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@types/adm-zip": "^0.5.0",
"absurd-sql": "0.0.54",
"assert": "^2.0.0",
"better-sqlite3": "^9.1.1",
"better-sqlite3": "^9.2.2",
"browserify-zlib": "^0.2.0",
"core-js": "^3.8.3",
"csv-parse": "^4.10.1",
Expand Down
6 changes: 6 additions & 0 deletions upcoming-release-notes/2182.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
category: Maintenance
authors: [MatissJanis]
---

Electron-app app store (osx) release
Loading

0 comments on commit 808d44a

Please sign in to comment.