-
Notifications
You must be signed in to change notification settings - Fork 5
45 lines (41 loc) · 1.15 KB
/
macos.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
name: XMUX macOS
on:
push:
branches:
- master
paths:
- .github/workflows/macos.yaml
- lib/**
- macos/**
- pubspec.yaml
- pubspec.lock
jobs:
Build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: subosito/flutter-action@v2
with:
channel: beta
- name: Build
run: |
FLUTTER_BUILD_NUMBER=$(git rev-list --count HEAD)
GIT_DESC=$(git describe --tags)
if [[ $GIT_DESC =~ v([0-9]+)\.([0-9]+)\.([0-9]+)-([0-9]+)-g[a-f0-9]+ ]]; then
FLUTTER_BUILD_NAME="${BASH_REMATCH[1]}.$((BASH_REMATCH[2]+1)).${BASH_REMATCH[3]}"
else
FLUTTER_BUILD_NAME="0.0.1"
fi
echo $CONFIG_ENV | base64 -d > .env
flutter build macos \
--release \
--build-name=$FLUTTER_BUILD_NAME \
--build-number=$FLUTTER_BUILD_NUMBER
env:
CONFIG_ENV: ${{ secrets.CONFIG_ENV }}
- uses: actions/upload-artifact@v4
with:
name: XMUX-macOS
path: build/macos/Build/Products/Release/XMUX.app