-
Notifications
You must be signed in to change notification settings - Fork 25
72 lines (59 loc) · 2.71 KB
/
build-windows.yml
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Build and Package Windows app
on:
release:
types:
- created
jobs:
build-windows:
if: contains(github.event.release.tag_name, 'windows') || (!contains(github.event.release.tag_name, 'linux') && !contains(github.event.release.tag_name, 'windows') && !contains(github.event.release.tag_name, 'chrome'))
runs-on: windows-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: "3.22.3"
- run: flutter --version
- name: Setup dependencies
run: |
flutter doctor
choco install cmake ninja python3
choco install -y visualstudio2019buildtools --package-parameters "--add Microsoft.VisualStudio.Component.VC.Tools.x86.x64"
- name: Build Flutter Application
run: flutter build windows --release
- name: Publish to store
run: flutter pub run msix:create --store
- name: Copy MSIX file to /artifacts
run: |
mkdir artifacts
cp build/windows/x64/runner/Release/aewallet.msix artifacts/
- name: Get Version from pubspec.yaml
id: get_version
run: |
$version_str=$(gc .\pubspec.yaml | select-string '(?<=^version: ).*' -AllMatches | Select-Object -Expand Matches | %{$_.Value})
echo "version_app=${version_str}" >> $Env:GITHUB_OUTPUT
- name: Archive Artifact
run: |
mv build/windows/x64/runner/Release/ archethic-wallet
Compress-Archive -Path archethic-wallet -DestinationPath "artifacts/archethic-wallet-windows-${{ steps.get_version.outputs.version_app }}.zip"
- name: Checksum
run: |
sha256sum artifacts/archethic-wallet-windows-${{ steps.get_version.outputs.version_app }}.zip
- name: Upload msix artifact to action
uses: actions/upload-artifact@v4
with:
name: archethic-wallet-windows-${{ steps.get_version.outputs.version_app }}
path: artifacts/archethic-wallet-windows-${{ steps.get_version.outputs.version_app }}.msix
- name: Upload zip artifact to action
uses: actions/upload-artifact@v4
with:
name: archethic-wallet-windows-${{ steps.get_version.outputs.version_app }}
path: artifacts/archethic-wallet-windows-${{ steps.get_version.outputs.version_app }}.zip
- name: Upload artifacts to release
uses: softprops/action-gh-release@v2
with:
files: |
artifacts/archethic-wallet-windows-${{ steps.get_version.outputs.version_app }}.zip
artifacts/archethic-wallet-windows-${{ steps.get_version.outputs.version_app }}.msix