-
Notifications
You must be signed in to change notification settings - Fork 5
44 lines (39 loc) · 1.21 KB
/
windows.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
name: XMUX Windows
on:
push:
branches:
- master
paths:
- .github/workflows/windows.yaml
- lib/**
- windows/**
- pubspec.yaml
- pubspec.lock
jobs:
Build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: subosito/flutter-action@v2
with:
channel: beta
- name: Build
run: |
git config --global core.longpaths true
$buildNumber = git rev-list --count HEAD
$gitDescribe = git describe --tags
if ($gitDescribe -match 'v([0-9]+)\.([0-9]+)\.([0-9]+)-([0-9]+)-g[a-f0-9]+') {
$buildName = "$($matches[1]).$($matches[2]).$($matches[3])"
} else {
$buildName = "0.0.1"
}
[System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String(${env:CONFIG_ENV})) > .env
flutter build windows --release --build-name=$buildName --build-number=$buildNumber --dart-define-from-file=.env
env:
CONFIG_ENV: ${{ secrets.CONFIG_ENV }}
- uses: actions/upload-artifact@v4
with:
name: XMUX-Windows
path: build/windows/x64/runner/Release