Build executable #79
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 executable | |
on: | |
workflow_dispatch: | |
inputs: | |
id: | |
description: "run identifier" | |
required: false | |
jobs: | |
id: | |
name: Workflow ID Provider | |
runs-on: ubuntu-latest | |
steps: | |
- name: ${{ github.event.inputs.id }} | |
run: echo run ID ${{ github.event.inputs.id }} | |
- name: Get current branch | |
run: echo current branch ${{ github.ref }} | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.ref }} | |
submodules: recursive | |
token: ${{ secrets.PAT_TOKEN }} | |
- name: Set up python 3.10 for windows | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
cache: "pip" | |
- name: Install dependencies | |
run: | | |
python3 -m pip install --upgrade pip setuptools wheel flake8 pyinstaller==6.10.0 | |
python3 -m pip install -r win-req.txt | |
- name: Lint with flake8 | |
run: | | |
# stop the build if there are Python syntax errors or undefined names | |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
- name: Run pyinstaller | |
run: | | |
pyinstaller main.spec | |
- name: Copy additional files | |
run: | | |
mv settings.yaml dist/settings.yaml | |
mv icon.png dist/icon.png | |
mv icons/ dist/icons/ | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: "spycer-windows" | |
path: | | |
dist/ |