Skip to content
name: Lint and release .exe on Github
on:
# pull_request:
# types:
# - closed
# branches:
# - main
push:
branches:
- feature/cxfreeze
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
- name: Analysing the code with flake8
run: |
flake8 --extend-ignore E501 $(git ls-files '*.py')
build_exe:
needs: [lint]
runs-on: windows-latest
strategy:
matrix:
python-version: ["3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install cx_Freeze
pip install -r requirements.txt
- name: Build exe file
run: |
python.exe .\setup.py build
- name: Make zip with exe
run: |
Compress-Archive -Path build/exe.win-amd64-3.12/* -Destination SBM_Portable.zip
- name: Upload .exe to Release
uses: ncipollo/release-action@v1
with:
tag: Test
name: Release SBM
artifacts: SBM_Portable.zip
draft: true