-
Notifications
You must be signed in to change notification settings - Fork 525
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3a48dc2
commit 36a42b9
Showing
3 changed files
with
76 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
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.txt | ||
|
||
- name: Run PyInstaller for MacOS | ||
run: | | ||
cd poker | ||
pyinstaller 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: Create DMG | ||
run: | | ||
create-dmg \ | ||
--volname "DeepMind Pokerbot" \ | ||
--window-pos 200 120 \ | ||
--window-size 800 400 \ | ||
--icon-size 100 \ | ||
--icon "DeepMind Pokerbot.app" 200 190 \ | ||
--hide-extension "DeepMind Pokerbot.app" \ | ||
--app-drop-link 600 185 \ | ||
"DeepMindPokerbot.dmg" \ | ||
"dist/main/" | ||
- 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: ./DeepMindPokerbot.dmg | ||
asset_name: DeepMindPokerbot.dmg | ||
asset_content_type: application/octet-stream |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters