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 Heroes3MapLiker.py | |
ls build | |
- name: Run Windows Tests | |
run: python tests.py | |
- name: Upload windows artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: windows-binaries | |
path: build/Heroes3MapLiker.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 | |
ls build | |
chmod +rx build/Heroes3MapLiker_macos | |
- name: Run macOS Tests | |
run: python tests.py | |
- name: Upload mac artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: mac-binaries | |
path: build/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 | |
ls build | |
chmod +rx build/Heroes3MapLiker_linux | |
- name: Run Linux Tests | |
run: python tests.py | |
- name: Upload linux artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: linux-binaries | |
path: build/Heroes3MapLiker_linux | |
if: success() |