FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix: Remove invalid Summary and Description child elements from Package ยท pphatdev/php-version-switcher@702b856 ยท GitHub

๐ŸŽ‰ v0.1.2

๐ŸŽ‰ v0.1.2 #16

Workflow file for this run

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: Release
on:
release:
types: [published]
permissions:
contents: write
jobs:
build-release:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET 6
uses: actions/setup-dotnet@v4
with:
dotnet-version: "6.0.x"
- name: Restore
run: dotnet restore ./installer/Phat.wixproj
- name: Build MSI
shell: pwsh
run: |
$tagVersion = "${{ github.event.release.tag_name }}".TrimStart('v')
# Strip pre-release suffix (e.g., 1.1.1-beta -> 1.1.1)
$version = $tagVersion -replace '-.*$', ''
Write-Host "Tag: $tagVersion -> MSI Version: $version"
dotnet build ./installer/Phat.wixproj -c Release -p:ProductVersion=$version
if ($LASTEXITCODE -ne 0) {
Write-Error "Build failed with exit code $LASTEXITCODE"
exit $LASTEXITCODE
}
- name: Debug - List built files
shell: pwsh
run: |
Write-Host "=== Looking for output files ==="
$msiFiles = Get-ChildItem -Path "installer/bin/Release" -Filter "*.msi" -Recurse
if ($msiFiles) {
Write-Host "Found MSI files:"
$msiFiles | ForEach-Object {
Write-Host " - $($_.FullName) ($([math]::Round($_.Length / 1KB, 2)) KB)"
}
} else {
Write-Host "No .msi files found in installer/bin/Release!"
Write-Host ""
Write-Host "=== Directory contents ==="
Get-ChildItem -Path "installer/bin/Release" -Recurse | ForEach-Object { Write-Host $_.FullName }
}
- name: Code Sign MSI (Optional)
shell: pwsh
run: |
Write-Host "โ„น๏ธ Code signing certificate not configured."
Write-Host "To enable code signing, add CODE_SIGNING_CERT and CODE_SIGNING_PASS secrets to the repository."
Write-Host "The MSI will be distributed with elevated privileges for trusted installation."
- name: Upload Release Assets
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: pwsh
run: |
$msiPath = Get-ChildItem -Path "installer/bin/Release" -Filter "*.msi" -Recurse | Select-Object -First 1
if (-not $msiPath) {
Write-Error "No MSI file found!"
exit 1
}
$tagName = "${{ github.event.release.tag_name }}"
Write-Host "Uploading $($msiPath.Name) to release $tagName..."
# Upload the asset using GitHub CLI
gh release upload "$tagName" "$($msiPath.FullName)" --clobber
if ($LASTEXITCODE -eq 0) {
Write-Host "โœ… Successfully uploaded Phat.msi to release $tagName"
} else {
Write-Error "Failed to upload asset"
exit 1
}
- name: Verify Release
shell: pwsh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
$tagName = "${{ github.event.release.tag_name }}"
Write-Host "โœ… Release workflow completed successfully"
Write-Host "๐Ÿ“ฆ MSI uploaded to $tagName release"

Back | FazBrowse Home | New Git URL