Instructions to use requirements.txt #1
Workflow file for this run
This file contains hidden or 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: Build Executables for Linux, macOS, and Windows | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.x | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Build Linux executable | |
run: | | |
pyinstaller --onefile --windowed main.py | |
mv dist/main dist/my_app_linux | |
- name: Upload Linux executable | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: dist/my_app_linux | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
build-macos: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.x | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Build macOS executable | |
run: | | |
pyinstaller --onefile --windowed main.py | |
mv dist/main dist/my_app_macos | |
- name: Upload macOS executable | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: dist/my_app_macos | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
build-windows: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.x | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Build Windows executable | |
run: | | |
pyinstaller --onefile --windowed main.py | |
mv dist/main.exe dist/my_app_windows.exe | |
- name: Upload Windows executable | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: dist/my_app_windows.exe | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |