Rename application to ChiselPDF in UI and packaging #8
This file contains hidden or 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 and Release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - 'v*' | |
| jobs: | |
| build-and-release: | |
| runs-on: windows-latest | |
| permissions: | |
| contents: write | |
| packages: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev]" | |
| - name: Build with PyInstaller | |
| run: | | |
| pyinstaller --onefile --windowed --name "PDF-Page-Selector" --add-data "style.qss;." main.py | |
| - name: Set up .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '8.0.x' | |
| - name: Install vpk | |
| run: dotnet tool install -g vpk | |
| - name: Generate version number | |
| id: version | |
| run: | | |
| $version = "1.0.${{ github.run_number }}" | |
| echo "VERSION=$version" >> $env:GITHUB_OUTPUT | |
| echo "Version: $version" | |
| - name: Package with Velopack | |
| run: | | |
| vpk pack --packId ChiselPDF --packVersion ${{ steps.version.outputs.VERSION }} --packDir .\dist --mainExe PDF-Page-Selector.exe | |
| - name: Create Release and Upload Assets | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: v${{ steps.version.outputs.VERSION }} | |
| name: Release v${{ steps.version.outputs.VERSION }} | |
| draft: false | |
| prerelease: false | |
| files: | | |
| Releases/*-Setup.exe | |
| Releases/*-Portable.zip | |
| Releases/RELEASES | |
| Releases/*.nupkg |