Fix config corruption #248
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 Binaries | |
on: push | |
jobs: | |
deploy: | |
env: | |
VOCABSIEVE_DEBUG_BUILD: ${{ github.ref_type != 'tag' && 'yes' || '' }} # Set to 'yes' if not a tag | |
strategy: | |
matrix: | |
os: [windows-latest, macos-latest, ubuntu-latest, self-hosted] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
cache: 'pip' | |
- name: Install headers for lzo (Ubuntu) | |
run: | | |
sudo apt install -y liblzo2-dev zlib1g-dev | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
- name: Install dependencies | |
run: | | |
pip install wheel | |
pip install -r requirements.txt | |
pip install cx_freeze | |
- name: Build Windows App | |
run: | | |
cd cx_freeze | |
python setup.py bdist_msi | |
if: ${{ matrix.os == 'windows-latest' }} | |
- name: Build Mac App | |
run: | | |
cd cx_freeze | |
python setup.py bdist_dmg | |
if: ${{ matrix.os == 'macos-latest' || matrix.os == 'self-hosted'}} | |
- name: Build Linux AppImage | |
run: | | |
pip install python-appimage | |
cp vocabsieve.{desktop,png} recipe/ | |
echo $(pwd) | cat - recipe/requirements.txt > tmpfile && mv tmpfile recipe/requirements.txt | |
python -m python_appimage build app -p 3.11 recipe | |
mv VocabSieve-x86_64.AppImage VocabSieve-v$(grep version setup.cfg | awk '{print $3}')-linux-amd64.AppImage | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.os == 'windows-latest' && 'Windows' || matrix.os == 'macos-latest' && 'MacOS (Intel)' || matrix.os == 'self-hosted' && 'MacOS (Apple M1)' }} App | |
path: | | |
cx_freeze/dist/* | |
cx_freeze/build/*.dmg | |
if: ${{ matrix.os == 'windows-latest' || matrix.os == 'macos-latest' || matrix.os == 'self-hosted' }} | |
- name: Upload Linux AppImage | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Linux AppImage | |
path: | | |
*.AppImage | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
cx_freeze/dist/* | |
cx_freeze/build/*.dmg | |
*.AppImage | |
draft: true |