-
Notifications
You must be signed in to change notification settings - Fork 6
78 lines (68 loc) · 2.33 KB
/
build.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
71
72
73
74
75
76
77
78
name: Build
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- v*.*.* # Push events to v1.0, v1.1, and v1.9 tags
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-14]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.16.0'
channel: 'stable'
- run: dart pub global activate flutter_distributor
- run: flutter pub get
- if: matrix.os == 'macos-14'
run: |
VERSION=${GITHUB_REF_NAME#v}
echo Version: $VERSION
echo "VERSION=$VERSION" >> $GITHUB_ENV
npm install -g appdmg
dart run scripts/init.dart -a 'arm64'
flutter_distributor release --name ${{ matrix.os }}
mv dist/${VERSION}/lux-${VERSION}+${VERSION}-macos.dmg dist/${VERSION}/lux-${VERSION}-arm64-macos.dmg
dart run scripts/init.dart -a 'amd64'
flutter_distributor release --name ${{ matrix.os }}
mv dist/${VERSION}/lux-${VERSION}+${VERSION}-macos.dmg dist/${VERSION}/lux-${VERSION}-amd64-macos.dmg
- if: matrix.os == 'windows-latest'
run: |
mkdir -p C:\temp\dll
cp -Force C:\Windows\System32\msvcp140.dll C:\temp\dll\msvcp140.dll
cp -Force C:\Windows\System32\vcruntime140.dll C:\temp\dll\vcruntime140.dll
cp -Force C:\Windows\System32\vcruntime140_1.dll C:\temp\dll\vcruntime140_1.dll
dart run scripts/init.dart
flutter_distributor release --name ${{ matrix.os }}
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-artifact
path: dist/*/*
release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
- run: |
mkdir artifact
mv windows-latest-artifact/*/* artifact/
mv macos-14-artifact/*/* artifact/
- name: Generate checksum
uses: jmgilman/actions-generate-checksum@v1
with:
patterns: |
artifact/*
- name: GH Release
uses: softprops/action-gh-release@v2
with:
draft: true
files: |
checksum.txt
artifact/*