Skip to content

Commit

Permalink
Used dmg for macos build (#6)
Browse files Browse the repository at this point in the history
* test build macos dmg

* fix branch name

* try fix issue on npm

* Fix issue of dmg tool

* Remove node action and use direct cmd

* test install appdmg

* TRY TO FIX INTALL APPDMG

* downgrade macos version

* install python

* clear cache before install appdmg

* try other workaround

* check python version

* install py 3.9

* Retry with py 3.9

* fix install command

* Fix appdmg install

* Fixed asset type and config path

* separate appdmg cmd

* Update desktop_build.yaml

* fix app name

* Fixed other issue on name

* Enable other os build and change trigger to master
  • Loading branch information
M97Chahboun authored Dec 20, 2023
1 parent c228a83 commit d105380
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 13 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/desktop_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ jobs:
target: macOS
build_target: macos
build_path: build/macos/Build/Products/Release
asset_extension: .zip
asset_content_type: application/zip
asset_extension: .dmg
asset_content_type: application/vnd.appimage
- os: windows-latest
target: Windows
build_target: windows
Expand All @@ -65,7 +65,7 @@ jobs:
build_path: build/linux/x64/release/bundle
asset_extension: .tar.gz
asset_content_type: application/gzip
# - os: ubuntu-latest
- os: ubuntu-latest
# target: Android
# build_target: apk
# build_path: build/app/outputs/flutter-apk
Expand Down Expand Up @@ -110,10 +110,19 @@ jobs:
if: matrix.target == 'Linux'
run: tar czf $GITHUB_WORKSPACE/EyesCare${{ matrix.target }}.tar.gz *
working-directory: ${{ matrix.build_path }}
- name: Compress build for macOS
- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Convert build to dmg for macOS
if: matrix.target == 'macOS'
run: ditto -c -k --sequesterRsrc --keepParent Eyes\ Care.app $GITHUB_WORKSPACE/EyesCare${{ matrix.target }}.zip
working-directory: ${{ matrix.build_path }}
run: |
brew install [email protected]
npm config set python /usr/local/bin/python3.9
npm install -g appdmg
- name: run appdmg
if: matrix.target == 'macOS'
run: appdmg installer/dmg_creator/config.json $GITHUB_WORKSPACE/EyesCare${{ matrix.target }}.dmg
- name: Compress build for Windows
if: matrix.target == 'Windows'
run: compress-archive -Path * -DestinationPath ${env:GITHUB_WORKSPACE}\EyesCare${{ matrix.target }}.zip
Expand Down
2 changes: 1 addition & 1 deletion .vscode/branch-timer.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"master":5741,"add-build-desktop-workflow":3416,"theme-modes":797}
{"add-build-desktop-workflow":833,"master":304}
17 changes: 11 additions & 6 deletions installer/dmg_creator/config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
{
"title": "KeepYourEyes",
"contents": [
{ "x": 448, "y": 344, "type": "link", "path": "/Applications" },
{ "x": 192, "y": 344, "type": "file", "path": "../../build/macos/Build/Products/Release/eyes_care.app" }
]
}
"title": "Eyes Care",
"contents": [
{ "x": 448, "y": 344, "type": "link", "path": "/Applications" },
{
"x": 192,
"y": 344,
"type": "file",
"path": "../../build/macos/Build/Products/Release/Eyes Care.app"
}
]
}

0 comments on commit d105380

Please sign in to comment.