Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/release_message.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@
<img
src="https://img.shields.io/badge/Windows-Portable-0C88D8.svg?logo=github" />
</a>
<br />
<a
href="https://github.com/UnboundTechCo/defyxVPN/releases/download/RELEASE_TAG/DefyxVPN-Windows-Installer-x64.msix">
<img
src="https://img.shields.io/badge/Windows-Installer-0C88D8.svg?logo=windows" />
</a>
</td>
<td valign="top">10 or later</td>
</tr>
Expand Down
37 changes: 34 additions & 3 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,43 @@ jobs:
shell: pwsh
run: |
$source = "build/windows/x64/runner/Release"
$zipPath = "build/windows/x64/runner/Release/DefyxVPN-Windows-Portable-x64.zip"
$zipPath = "build/windows/DefyxVPN-Windows-Portable-x64.zip"
if (Test-Path $zipPath) { Remove-Item $zipPath }
Compress-Archive -Path "$source\*" -DestinationPath $zipPath

- name: Upload Windows Release ZIP
- name: Build Windows Installer
shell: pwsh
run: |
$pubspecPath = "pubspec.yaml"
$pubspec = Get-Content $pubspecPath -Raw
$versionMatch = [regex]::Match($pubspec, '(?m)^version:\s*(\d+\.\d+\.\d+)\+(\d+)\s*$')
if (-not $versionMatch.Success) {
throw "Could not find a Flutter version in pubspec.yaml"
}
$msixVersion = "$($versionMatch.Groups[1].Value).$($versionMatch.Groups[2].Value)"
$pubspec = [regex]::Replace(
$pubspec,
'(?m)^ msix_version:\s*.*$',
" msix_version: $msixVersion"
)
Set-Content -Path $pubspecPath -Value $pubspec -NoNewline

dart run msix:create

$installerDirectory = "build/windows/installer"
New-Item -ItemType Directory -Force -Path $installerDirectory | Out-Null
$msix = Get-ChildItem -Path "build/windows" -Filter "*.msix" -Recurse |
Where-Object { $_.FullName -notlike "*\installer\*" } |
Select-Object -First 1
if ($null -eq $msix) {
throw "MSIX package was not generated"
}
Move-Item $msix.FullName "$installerDirectory\DefyxVPN-Windows-Installer-x64.msix" -Force

- name: Upload Windows Release Artifacts
uses: actions/upload-artifact@v4
with:
name: windows-release
path: build/windows/x64/runner/Release/DefyxVPN-Windows-Portable-x64.zip
path: |
build/windows/DefyxVPN-Windows-Portable-x64.zip
build/windows/installer/DefyxVPN-Windows-Installer-x64.msix