Build executable for linux #15
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 for linux | |
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: ubuntu-latest | |
container: node:16-buster | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.ref }} | |
submodules: recursive | |
token: ${{ secrets.PAT_TOKEN }} | |
- name: Set lsb_release | |
run: | | |
apt-get update && apt-get install -y lsb-release && cat lsb_entry > /etc/lsb-release | |
- name: Set up python 3.8.16 for Linux | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.8.16" | |
# cache: "pip" | |
- name: Install dependencies | |
run: | | |
python3 -m pip install --upgrade pip setuptools wheel flake8 pyinstaller | |
python3 -m pip install -r linux-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 | |
- name: Upload artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: "spycer-linux" | |
path: | | |
dist/ |