Binary Release for MacOS #11
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
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 | |