Skip to content

Update workflow

Update workflow #16

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Python application
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
permissions:
contents: write
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r adbgateway/requirements.txt
pip install pyinstaller
- name: Build
run: pyinstaller adbgateway.spec
- uses: actions/upload-artifact@v3
with:
name: linux-${{ github.sha }}
path: dist/adbgateway
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r adbgateway/requirements.txt
pip install pyinstaller
- name: Build
run: pyinstaller adbgateway.spec
- uses: actions/upload-artifact@v3
with:
name: windows-${{ github.sha }}.exe
path: dist/adbgateway.exe
release:
runs-on: ubuntu-latest
needs: [build-linux, build-windows]
steps:
- uses: actions/download-artifact@v4
with:
path: artifacts
merge-multiple: true
- name: Release
uses: softprops/action-gh-release@v1
with:
fail_on_unmatched_files: true
tag_name: release-${{ github.sha }}
name: ${{ github.sha }}
files: |
linux-${{ github.sha }}
windows-${{ github.sha }}.exe