-
Notifications
You must be signed in to change notification settings - Fork 12
80 lines (67 loc) · 2.4 KB
/
windows_ci_cd.yaml
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
73
74
75
76
77
78
79
80
on:
push:
branches: [main]
name: Windows
jobs:
build-windows:
name: "Build Windows for MS Store"
runs-on: windows-latest
timeout-minutes: 30
env:
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
steps:
- uses: actions/[email protected]
- name: read yaml
id: read_action_js
uses: pietrobolcato/[email protected]
with:
config: ${{ github.workspace }}/pubspec.yaml
- name: Create Version Number
id: versions
run: |
echo "::set-output name=version::${{ steps.read_action_js.outputs['version'] }}"
- name: Setup Flutter SDK
uses: subosito/[email protected]
with:
channel: "stable"
- name: Enable desktop
run: flutter config --enable-windows-desktop
- name: Generate MSIX-compatible version
uses: ashley-taylor/[email protected]
id: msixver
with:
value: ${{steps.versions.outputs.version }}
regex: (\-\w+)|(\+\w+)
replacement: ""
- name: Write MSIX
uses: DamianReeves/[email protected]
with:
path: pubspec.yaml
contents: |
msix_config:
display_name: FlutterPP
publisher_display_name: waqtollcapps
identity_name: waqtollcapps.FlutterPP
publisher: CN=52C80A4B-6F71-430C-88F2-0AFF0C54D249
msix_version: ${{steps.msixver.outputs.value }}.0
logo_path: assets\windwos.png
architecture: x64
capabilities: "internetClient,removableStorage"
certificate_path: windows/CERTIFICATE.pfx
certificate_password: ${{ secrets.PROD_WIN_CERTIFICATE_PWD }}
install_certificate: true
write-mode: append
- name: Flutter get packages
run: flutter pub get
- name: Flutter build app
run: flutter build windows
- name: Create MSIX
run: flutter pub run msix:create
- name: Upload MSIX to release
uses: svenstaro/[email protected]
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: build/windows/x64/Runner/release/FlutterPP.msix
asset_name: FlutterPP-windows-${{ steps.versions.outputs.version }}-MS-NS.msix
tag: ${{ steps.versions.outputs.version }}
release_name: Release ${{ steps.versions.outputs.version }}