commit of requirements.txt #23
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: Build and Pack | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies and execute flet pack | |
run: | | |
python -m venv venv | |
source venv/bin/activate | |
pip install -r requirements.txt # Replace with your requirements file if needed | |
flet pack main.py --name bike_maintenance_tool | |
deactivate # Deactivate the virtual environment | |
- name: Make binary executable | |
run: chmod +x ./dist/bike_maintenance_tool | |
- name: Publish Artifact for Linux | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Bike maintenance tool - Linux | |
path: dist/bike_maintenance_tool | |
build-windows: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies and execute flet pack | |
run: | | |
python -m venv venv | |
.\venv\Scripts\Activate # Activate virtual environment on Windows | |
pip install -r requirements.txt # Replace with your requirements file if needed | |
flet pack main.py --name bike_maintenance_tool | |
deactivate # Deactivate the virtual environment | |
- name: Install NSIS | |
# You may pin to the exact commit or the version. | |
# uses: repolevedavaj/install-nsis@ec679f227a9820f1ffedd9563648d257a6fc4649 | |
uses: repolevedavaj/install-nsis@v1.0.1 | |
with: | |
# The version of NSIS to install | |
nsis-version: 3.09 | |
- name: Compile NSIS Script | |
run: | | |
& 'C:\Program Files (x86)\NSIS\makensis.exe' installer_files/windows_installer.nsi | |
- name: Publish Artifact for Windows | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Bike maintenance tool - Windows Installer | |
path: . |