Fix platfrom #112
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |