epson_print_conf/.github/workflows/build.yml

47 lines
1.3 KiB
YAML
Raw Normal View History

2024-07-29 05:03:58 -04:00
name: Build Workflow
on:
2024-07-29 15:03:03 -04:00
push:
tags:
- "v*.*.*"
2024-07-29 05:03:58 -04:00
jobs:
build-windows:
2024-07-29 06:08:45 -04:00
runs-on: windows-latest
2024-07-29 05:03:58 -04:00
steps:
- name: Checkout
2024-07-29 05:29:55 -04:00
uses: actions/checkout@v4
2024-07-29 19:26:15 -04:00
2024-07-29 05:03:58 -04:00
- name: Install Python
2024-07-29 15:03:03 -04:00
uses: actions/setup-python@v5
2024-07-29 05:03:58 -04:00
with:
python-version: '3.11'
2024-07-29 05:03:58 -04:00
architecture: 'x64'
2024-07-29 19:26:15 -04:00
2024-07-29 05:03:58 -04:00
- name: Install requirements
run: |
2024-07-30 07:00:11 -04:00
python -m pip install --upgrade pip
#pip install git+https://github.com/pyinstaller/pyinstaller@develop
pip install pyinstaller
2024-07-29 05:03:58 -04:00
pip install -r requirements.txt
2024-07-29 19:26:15 -04:00
2024-07-29 05:03:58 -04:00
- name: Run PyInstaller
run: |
python -m PyInstaller epson_print_conf.spec -- --default
2024-08-06 19:37:32 -04:00
- name: Zip EXE
run: |
powershell -Command Compress-Archive dist/epson_print_conf.exe dist/epson_print_conf.zip
2024-07-29 15:03:03 -04:00
- name: Generate Changelog
2024-07-29 19:26:15 -04:00
run: echo "The executable file in the assets below is auto-generated by a GitHub Action." > ${{ github.workspace }}-CHANGELOG.txt
2024-07-29 15:03:03 -04:00
2024-07-29 05:29:55 -04:00
- name: Create Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
2024-07-29 05:03:58 -04:00
with:
2024-07-29 15:03:03 -04:00
body_path: ${{ github.workspace }}-CHANGELOG.txt
2024-08-06 19:37:32 -04:00
files: dist/epson_print_conf.zip
2024-07-29 18:57:02 -04:00
append_body: true
generate_release_notes: true