-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (47 loc) · 1.56 KB
/
release-windows.yml
File metadata and controls
58 lines (47 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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 }}
files: release-assets/AndroidIRCx-Flutter-windows.zip