name: Build Workflow for epson_print_conf.exe/zip on: push: tags: - "v*.*.*" jobs: build-windows: runs-on: windows-latest steps: - name: Git Checkout uses: actions/checkout@v4 - name: Install Python uses: actions/setup-python@v5 with: python-version: '3.11' architecture: 'x64' - name: Install Python Requirements run: | python -m pip install --upgrade pip #pip install git+https://github.com/pyinstaller/pyinstaller@develop pip install pyinstaller pip install Pillow pip install -r requirements.txt - name: Run PyInstaller to create epson_print_conf.exe run: > python -m PyInstaller epson_print_conf.spec -- --default --version ${{ github.ref_name }} - name: Zip the epson_print_conf.exe asset to epson_print_conf.zip run: | Compress-Archive dist/epson_print_conf.exe dist/epson_print_conf.zip shell: pwsh - name: Generate Changelog 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 - name: Create Release, uploading the epson_print_conf.zip asset uses: softprops/action-gh-release@v2 if: startsWith(github.ref, 'refs/tags/') with: body_path: ${{ github.workspace }}-CHANGELOG.txt files: dist/epson_print_conf.zip append_body: true generate_release_notes: true - 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