-
Notifications
You must be signed in to change notification settings - Fork 527
71 lines (58 loc) · 1.92 KB
/
release mac.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
61
62
63
64
65
66
67
68
69
70
71
name: Binary Release for MacOS
on:
workflow_dispatch:
jobs:
build:
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.11
cache: pip
- name: Install dependencies
run: pip install -r requirements_mac.txt
- name: Run PyInstaller for MacOS
run: |
cd poker
pyinstaller --noconfirm --clean --distpath dist/main main.spec
- name: Prepare distribution for MacOS
run: |
cd poker
mkdir -p dist/main/log
mkdir -p dist/main/pics
mkdir -p dist/main/log/screenshots
cp icon.ico dist/main/poker.ico
cp config_default.ini dist/main/config.ini
cp -r vboxapi dist/main/vboxapi/
- name: Install create-dmg
run: npm install -g create-dmg
- name: List contents of PyInstaller output directory
run: |
cd poker/dist/main
ls
- name: Create DMG
run: |
cd poker/dist/main
create-dmg DeepMindPokerbot.dmg .
- name: Create Release for MacOS
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: DeepermindPokerbot-mac-${{ github.run_number }}
release_name: Mac Release ${{ github.run_number }}
draft: false
prerelease: false
- name: Upload DMG to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: /Users/runner/work/Poker/Poker/dist/main/DeepMindPokerbot.dmg
asset_name: DeepMindPokerbot.dmg
asset_content_type: application/octet-stream