Fixes #500 - Logon Details: Build exe using GitHub action #39
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 | ||
on: | ||
push: | ||
branches: | ||
- '*' | ||
pull_request: | ||
jobs: | ||
changes: | ||
name: Check for Changes | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: read | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
- name: Check for Changes | ||
uses: dorny/paths-filter@v2 | ||
outputs: | ||
build-exe: ${{ steps.filter.outputs.build-exe }} | ||
with: | ||
filters: | | ||
build-exe: | ||
- './UK/LogonDetails.py' | ||
build-exe: | ||
name: Build EXE | ||
runs-on: windows-latest | ||
needs: changes | ||
if: ${{ needs.changes.outputs.build-exe == 'true' }} | ||
concurrency: | ||
group: uk-controller-pack-build-${{ github.ref }} | ||
cancel-in-progress: true | ||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
- name: Install Dependencies | ||
run: pip install pyinstaller | ||
- name: Run Python Script | ||
run: pyinstaller --distpath ./UK/ --onefile -n LogonDetails.exe ./UK/LogonDetails.py | ||
- name: Debug | ||
run: ls ./UK/ | ||
- name: Commit exe File | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git add ./UK/LogonDetails.exe | ||
git commit -m "Update LogonDetails.exe" |