-
Notifications
You must be signed in to change notification settings - Fork 105
60 lines (57 loc) · 1.95 KB
/
macos-package.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: macOS package
on:
push:
tags: [ '**' ]
workflow_dispatch:
jobs:
build:
runs-on: macos-12
steps:
- uses: actions/checkout@v2
- name: Set up python
env:
PYVER: '3.9.7'
PYVER_SHORT: '3.9'
run: |
wget -O python.pkg "https://www.python.org/ftp/python/${PYVER}/python-${PYVER}-macosx10.9.pkg"
sudo installer -pkg python.pkg -target /
echo "/Library/Frameworks/Python.framework/Versions/${PYVER_SHORT}/bin" >> $GITHUB_PATH
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install --no-binary=Pillow \
Pillow attrs configobj py2app pycotap pygame pysol-cards random2 setuptools six ttkthemes
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
brew install create-dmg
- name: Get cardsets
run: |
wget -O cardsets-pack.tar.xz "https://sourceforge.net/projects/pysolfc/files/PySolFC-Cardsets/minimal/PySolFC-Cardsets--Minimal-3.0.0.tar.xz/download"
tar -xJf cardsets-pack.tar.xz
mv PySolFC-Cardsets--Minimal-3.0.0/cardset-* data
- name: Prepare game rules (process the HTML) and translations
run: |
make rules mo
- name: Create the executable .app
run: |
PYTHONPATH="." python3 setup_osx.py py2app
zip -q -r -X PySolFC-app.zip dist
- name: Make the .dmg for easy installation
run:
create-dmg --volname "Install PySolFC"
--volicon data/PySol.icns
--background html-src/images/pysollogo01.png
--window-size 800 400
--icon PySolFC.app 200 185
--app-drop-link 600 185
--skip-jenkins
PySolFC.dmg dist
- name: Upload zipped app
uses: actions/upload-artifact@v2
with:
name: pysolfc-app
path: PySolFC-app.zip
- name: Upload dmg
uses: actions/upload-artifact@v2
with:
name: pysolfc-dmg
path: PySolFC.dmg