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: test and release software | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build_and_test_windows: | |
runs-on: windows-latest | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.9' | |
- name: Install dependencies | |
run: | | |
pip install Pillow requests pyinstaller pyautogui | |
- name: Build for Windows | |
run: | | |
pyinstaller --onefile --noconsole --icon=assets/view_earth.ico --name=Heroes3MapLiker_windows Heroes3MapLiker.py | |
- name: List current directory contents | |
run: | | |
echo "Contents of current directory:" | |
dir | |
- name: Run Windows Tests | |
run: python tests.py --platform windows | |
- name: Upload windows artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: windows-binaries | |
path: Heroes3MapLiker_windows.exe | |
if: success() | |
build_and_test_macos: | |
runs-on: macos-latest | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.9' | |
- name: Install dependencies | |
run: | | |
pip install Pillow requests pyinstaller pyautogui | |
- name: Build for macOS | |
run: | | |
pyinstaller --onefile --noconsole --icon=assets/view_earth.ico --name=Heroes3MapLiker_macos Heroes3MapLiker.py | |
- name: List current directory contents | |
run: | | |
echo "Contents of current directory:" | |
ls | |
- name: Run macOS Tests | |
run: python tests.py --platform macos | |
- name: Upload mac artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: mac-binaries | |
path: Heroes3MapLiker_macos | |
if: success() | |
build_and_test_linux: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.9' | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y python3-tk | |
pip install Pillow requests pyinstaller pyautogui | |
- name: Build for Linux | |
run: | | |
pyinstaller --onefile --noconsole --icon=assets/view_earth.ico --name=Heroes3MapLiker_linux Heroes3MapLiker.py | |
- name: List current directory contents | |
run: | | |
echo "Contents of current directory:" | |
ls | |
- name: Run Linux Tests | |
run: python tests.py --platform linux | |
- name: Upload linux artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: linux-binaries | |
path: Heroes3MapLiker_linux | |
if: success() |