Skip to content

Add custom success message box with "Open Folder" option in MainApp #25

Add custom success message box with "Open Folder" option in MainApp

Add custom success message box with "Open Folder" option in MainApp #25

Workflow file for this run

name: Build and Release
on:
push:
branches:
- main
tags:
- 'v*'
env:
MAJOR_VERSION: 1
MINOR_VERSION: 0
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 --onedir --windowed --name "ChiselPDF" --add-data "style.qss;." main.py
- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Generate version number
id: version
run: |
$version = "${{ env.MAJOR_VERSION }}.${{ env.MINOR_VERSION }}.${{ github.run_number }}"
echo "VERSION=$version" >> $env:GITHUB_OUTPUT
echo "Version: $version"
- name: Create version info file
run: |
@"
VSVersionInfo(
ffi=FixedFileInfo(
filevers=(${{ env.MAJOR_VERSION }}, ${{ env.MINOR_VERSION }}, ${{ github.run_number }}, 0),
prodvers=(${{ env.MAJOR_VERSION }}, ${{ env.MINOR_VERSION }}, ${{ github.run_number }}, 0),
mask=0x3f,
flags=0x0,
OS=0x40004,
fileType=0x1,
subtype=0x0,
date=(0, 0)
),
kids=[
StringFileInfo([
StringTable(
u'040904B0',
[StringStruct(u'CompanyName', u'kelltom'),
StringStruct(u'FileDescription', u'ChiselPDF - PDF Page Selector'),
StringStruct(u'FileVersion', u'${{ env.MAJOR_VERSION }}.${{ env.MINOR_VERSION }}.${{ github.run_number }}.0'),
StringStruct(u'InternalName', u'ChiselPDF'),
StringStruct(u'LegalCopyright', u'Copyright (c) 2025 kelltom'),
StringStruct(u'OriginalFilename', u'ChiselPDF.exe'),
StringStruct(u'ProductName', u'ChiselPDF'),
StringStruct(u'ProductVersion', u'${{ env.MAJOR_VERSION }}.${{ env.MINOR_VERSION }}.${{ github.run_number }}.0')])
]),
VarFileInfo([VarStruct(u'Translation', [1033, 1200])])
]
)
"@ | Out-File -FilePath version_info.txt -Encoding UTF8
- name: Create Velopack Release
run: |
dotnet tool install -g vpk
vpk download github --repoUrl https://github.com/${{ github.repository }} --token ${{ secrets.GITHUB_TOKEN }}
vpk pack --packId ChiselPDF --packVersion ${{ steps.version.outputs.VERSION }} --packDir .\dist\ChiselPDF --mainExe ChiselPDF.exe
vpk upload github --repoUrl https://github.com/${{ github.repository }} --publish --releaseName "ChiselPDF ${{ steps.version.outputs.VERSION }}" --tag v${{ steps.version.outputs.VERSION }} --token ${{ secrets.GITHUB_TOKEN }}