Remove web version from build workflow #33
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 Flex Executables | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
build: | |
name: Build Flex Executable (${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
include: | |
- os: ubuntu-latest | |
output_name: flex-linux | |
asset_name: flex-linux | |
- os: windows-latest | |
output_name: flex-windows | |
asset_name: flex-windows.exe | |
- os: macos-latest | |
output_name: flex-macos | |
asset_name: flex-macos | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pyinstaller | |
pip install -r src/requirements.txt | |
continue-on-error: true | |
- name: Install dependencies (without requirements.txt) | |
if: ${{ failure() }} | |
run: | | |
python -m pip install --upgrade pip | |
pip install pyinstaller | |
pip install ply==3.11 | |
- name: Build with PyInstaller for Linux/macOS | |
if: matrix.os != 'windows-latest' | |
run: | | |
chmod +x src/flex.sh | |
cd src | |
pyinstaller --onefile --name=${{ matrix.output_name }} main.py | |
- name: Build with PyInstaller for Windows | |
if: matrix.os == 'windows-latest' | |
run: | | |
cd src | |
pyinstaller --onefile --name=${{ matrix.output_name }} main.py | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.asset_name }} | |
path: src/dist/${{ matrix.output_name }}* | |
retention-days: 7 | |
release: | |
name: Create Release | |
needs: [build] | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Download All Artifacts | |
uses: actions/download-artifact@v4 | |
- name: Display structure of downloaded files | |
run: ls -R | |
- name: Create Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: v${{ github.run_number }} | |
name: Release v${{ github.run_number }} | |
draft: false | |
prerelease: false | |
files: | | |
./flex-linux/flex-linux | |
./flex-windows.exe/flex-windows.exe | |
./flex-macos/flex-macos |