Skip to content

chore: bump version to 4.0.23 #13

chore: bump version to 4.0.23

chore: bump version to 4.0.23 #13

Workflow file for this run

name: windows-release
on:
push:
tags:
- "v*"
workflow_dispatch:
inputs:
tag:
description: "Tag to build and release (example: v3.5.1)"
required: true
type: string
permissions:
contents: write
concurrency:
group: windows-release-${{ github.ref }}
cancel-in-progress: false
jobs:
build-and-publish:
runs-on: windows-latest
steps:
- name: Checkout source
uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || github.ref }}
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.11"
- name: Validate tag matches package version
shell: pwsh
run: |
$tag = if ("${{ github.event_name }}" -eq "workflow_dispatch") { "${{ github.event.inputs.tag }}" } else { "${{ github.ref_name }}" }
if (-not $tag.StartsWith("v")) {
throw "Release tag must start with 'v'. Got: $tag"
}
$tagVersion = $tag.Substring(1)
$packageXml = Get-Content -Raw "PDFVectorImporter/package.xml"
$match = [regex]::Match($packageXml, "<version>(.*?)</version>")
if (-not $match.Success) {
throw "Could not find <version> in PDFVectorImporter/package.xml"
}
$packageVersion = $match.Groups[1].Value.Trim()
if ($packageVersion -ne $tagVersion) {
throw "Version mismatch: tag '$tag' != package.xml '$packageVersion'"
}
Write-Host "Version check passed: $tagVersion"
- name: Install Inno Setup
shell: pwsh
run: choco install innosetup --yes --no-progress
- name: Build ZIP and Setup.exe
shell: pwsh
run: python build_windows_installer.py
- name: Upload build artifacts (workflow run)
uses: actions/upload-artifact@v4
with:
name: PDFVectorImporter-release-assets
path: |
dist/*.zip
dist/*.exe
if-no-files-found: error
- name: Publish GitHub Release assets
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || github.ref_name }}
generate_release_notes: true
files: |
dist/*.zip
dist/*.exe