Skip to content

Release Windows

Release Windows #1

Workflow file for this run

name: Release Windows
on:
workflow_dispatch:
permissions:
contents: write
jobs:
build-windows:
name: Build Windows Package
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Install dependencies
run: flutter pub get
- name: Enable Windows desktop
run: flutter config --enable-windows-desktop
- name: Build Windows release
run: flutter build windows --release
- name: Package Windows release
shell: pwsh
run: |
$artifactDir = "release-assets"
New-Item -ItemType Directory -Force -Path $artifactDir | Out-Null
$source = "build/windows/x64/runner/Release"
$zipPath = Join-Path $artifactDir "AndroidIRCx-Flutter-windows.zip"
if (Test-Path $zipPath) {
Remove-Item $zipPath -Force
}
Compress-Archive -Path "$source/*" -DestinationPath $zipPath
- name: Upload workflow artifact
uses: actions/upload-artifact@v4
with:
name: windows-release-zip
path: release-assets/AndroidIRCx-Flutter-windows.zip
- name: Attach Windows package to GitHub release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
generate_release_notes: true
files: release-assets/AndroidIRCx-Flutter-windows.zip