Update README #149
Workflow file for this run
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 Executables | |
on: | |
push: | |
pull_request: | |
release: | |
types: | |
- created | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Save version info | |
shell: bash | |
run: | | |
echo "UPDATE_TOOL_VERSION = '$(git describe --tags --always)'" > update_tool_version.py | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
if [ -f requirements.txt ]; then | |
pip install -r requirements.txt | |
fi | |
pip install "pyinstaller==5.13.2" | |
- name: Build Executable | |
run: | | |
pip install pyinstaller | |
pyinstaller --icon=wificomlogo1.ico --onefile --noupx --hidden-import=queue --name wificom-update-installer run.py | |
- name: Rename executables | |
run: | | |
if [ "${{ runner.os }}" == "Windows" ]; then | |
mv dist/wificom-update-installer.exe wificom-update-tool.exe | |
fi | |
if [ "${{ runner.os }}" == "Linux" ]; then | |
mv dist/wificom-update-installer wificom-update-tool-linux | |
fi | |
if [ "${{ runner.os }}" == "macOS" ]; then | |
mv dist/wificom-update-installer wificom-update-tool-macos | |
fi | |
- name: Upload as Build Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: WiFiCom-Update-Tool-${{ runner.os }} | |
path: | | |
wificom-update-tool.exe | |
wificom-update-tool-linux | |
wificom-update-tool-macos | |
- name: Attach to release | |
if: github.event_name == 'release' | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
wificom-update-tool.exe | |
wificom-update-tool-linux | |
wificom-update-tool-macos |