-
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 71747cb
Showing
3 changed files
with
74 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,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.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 | ||
|
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