2024-08-07 02:53:47 -04:00
|
|
|
name: Build Workflow for epson_print_conf.exe/zip
|
2024-07-29 05:03:58 -04:00
|
|
|
|
|
|
|
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:
|
2024-08-07 02:53:47 -04:00
|
|
|
- name: Git 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:
|
2024-07-29 07:15:29 -04:00
|
|
|
python-version: '3.11'
|
2024-07-29 05:03:58 -04:00
|
|
|
architecture: 'x64'
|
2024-07-29 19:26:15 -04:00
|
|
|
|
2024-08-07 02:53:47 -04:00
|
|
|
- name: Install Python Requirements
|
2024-07-29 05:03:58 -04:00
|
|
|
run: |
|
2024-07-30 07:00:11 -04:00
|
|
|
python -m pip install --upgrade pip
|
2024-08-06 01:24:19 -04:00
|
|
|
#pip install git+https://github.com/pyinstaller/pyinstaller@develop
|
|
|
|
pip install pyinstaller
|
2024-08-13 12:01:12 -04:00
|
|
|
pip install Pillow
|
2024-07-29 05:03:58 -04:00
|
|
|
pip install -r requirements.txt
|
2024-07-29 19:26:15 -04:00
|
|
|
|
2024-08-07 02:53:47 -04:00
|
|
|
- name: Run PyInstaller to create epson_print_conf.exe
|
2024-08-13 16:47:44 -04:00
|
|
|
run: >
|
2024-07-29 05:03:58 -04:00
|
|
|
python -m PyInstaller epson_print_conf.spec -- --default
|
2024-08-13 16:47:44 -04:00
|
|
|
--version ${{ github.ref_name }}
|
2024-07-29 05:03:58 -04:00
|
|
|
|
2024-08-07 02:53:47 -04:00
|
|
|
- name: Zip the epson_print_conf.exe asset to epson_print_conf.zip
|
2024-08-13 12:01:12 -04:00
|
|
|
run: |
|
|
|
|
Compress-Archive dist/epson_print_conf.exe dist/epson_print_conf.zip
|
|
|
|
shell: pwsh
|
2024-08-06 19:37:32 -04:00
|
|
|
|
2024-07-29 15:03:03 -04:00
|
|
|
- name: Generate Changelog
|
2024-08-07 02:53:47 -04:00
|
|
|
run: >
|
|
|
|
echo "The *epson_print_conf.exe* executable file in the
|
|
|
|
*epson_print_conf.zip* archive within the assets below is
|
|
|
|
auto-generated by a [GitHub Action](.github/workflows/build.yml)."
|
|
|
|
> ${{ github.workspace }}-CHANGELOG.txt
|
2024-07-29 15:03:03 -04:00
|
|
|
|
2024-08-07 02:53:47 -04:00
|
|
|
- name: Create Release, uploading the epson_print_conf.zip asset
|
2024-07-29 05:29:55 -04:00
|
|
|
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
|
2024-09-29 04:16:48 -04:00
|
|
|
|
|
|
|
- name: Remove old releases
|
|
|
|
uses: Nats-ji/delete-old-releases@v1
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
keep-count: 1
|
|
|
|
keep-old-minor-releases: false
|
|
|
|
keep-old-minor-releases-count: 1
|
|
|
|
remove-tags: true
|