-
-
Notifications
You must be signed in to change notification settings - Fork 16
70 lines (57 loc) · 1.98 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
name: Build Windows
on:
# Enable manual run
workflow_dispatch:
# Allow being called by other workflows
workflow_call:
inputs:
pre-release:
description: "Whether the build is for a pre-release"
required: false
default: false
type: boolean
env:
app-display-name: "Nyrna"
author: "Merritt Codes"
identifier: "codes.merritt.Nyrna"
msix-icon-path: "assets\\icons\\codes.merritt.Nyrna.png"
jobs:
build-windows:
name: Build Windows
runs-on: windows-2019
# ----------------------------------- Setup ------------------------------ #
steps:
- name: Set pre-release environment variable
if: inputs.pre-release == true
run: echo "prerelease=true" >> $GITHUB_ENV
- name: Setup Flutter
uses: subosito/flutter-action@v2.10.0
# Specify the Flutter version to work around bug in new version:
# https://github.com/flutter/flutter/issues/144873
with:
flutter-version: '3.19.6'
- name: Checkout code
uses: actions/checkout@v3
- name: Prepare for build
run: |
flutter config --enable-windows-desktop
flutter pub get
# ----------------------------------- Build ---------------------------- #
- name: Run build script
env:
GITHUB_TOKEN: ${{ secrets.RELEASES_TOKEN }}
run: flutter pub run flutter_app_builder -v --platforms=windows
# ---------------------------------- Upload ---------------------------- #
- name: Upload Windows Store MSIX artifact to workflow
uses: actions/upload-artifact@v3
with:
name: windows-store-artifact
path: output/*.msix
# MSIX is only for publishing to the Windows Store.
- name: Remove Windows Store artifact from release files
run: rm output/*.msix
- name: Upload artifacts to workflow
uses: actions/upload-artifact@v3
with:
name: windows-artifacts
path: output/*