Skip to content

Commit

Permalink
Add: GitHub Action
Browse files Browse the repository at this point in the history
Signed-off-by: NaveenKumar Namachivayam <[email protected]>
  • Loading branch information
QAInsights committed Nov 19, 2023
1 parent 69e1696 commit db92c05
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ on:
jobs:
build:

# run on self-hosted runner and macos-latest for arm64 architecture and intel architecture
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ self-hosted, macos ]
arch: [ 'X64', 'ARM64' ]

steps:
- uses: actions/checkout@v3

- name: Set up Python 3.10.11
uses: actions/setup-python@v3
with:
Expand All @@ -36,36 +36,35 @@ jobs:
uname -a
python setup.py py2app
mv dist dist-intel
if: github.runner == 'macos'
if: matrix.os == 'macos' && matrix.arch == 'X64'

- name: Generate app for arm64 architecture
run: |
python setup.py py2app
mv dist dist-arm64
if: github.runner == 'self-hosted'
if: matrix.os == 'self-hosted' && matrix.arch == 'ARM64'

- name: Convert dist-intel to DMG
run: |
hdiutil create -volname "Hamster" -srcfolder dist-intel -ov -format UDZO dist-intel/Hamster-intel.dmg
if: runner.os == 'macos'
if: matrix.os == 'macos' && matrix.arch == 'X64'

- name: Convert dist-arm64 to DMG
run: |
hdiutil create -volname "Hamster" -srcfolder dist-arm64 -ov -format UDZO dist-arm64/Hamster-darwin.dmg
if: github.runner == 'self-hosted'
if: matrix.os == 'self-hosted' && matrix.arch == 'ARM64'

- name: Upload intel app
uses: actions/upload-artifact@v2
with:
name: Hamster-macos-intel-x86_64
path: dist-intel/Hamster-intel.dmg
if: github.runner == 'macos'
if: matrix.os == 'macos' && matrix.arch == 'X64'

- name: Upload arm64 app
uses: actions/upload-artifact@v2
with:
name: Hamster-macos-apple-arm64
path: dist-arm64/Hamster-darwin.dmg
if: github.runner == 'self-hosted'

if: matrix.os == 'self-hosted' && matrix.arch == 'ARM64'

0 comments on commit db92c05

Please sign in to comment.