-
Notifications
You must be signed in to change notification settings - Fork 20
68 lines (55 loc) · 2.13 KB
/
windows_deploy.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
name: デプロイ(windows zip)
on:
workflow_dispatch:
release:
types: [published]
permissions:
contents: write
jobs:
build_for_windows:
name: Windows用ビルド
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
- name: Flutter pub get
run: |
git config --system core.longpaths true
flutter pub get
- name: Get App Version
run: |
echo "version=$(flutter pub run cider version)" >> $env:GITHUB_ENV
echo "builddir=$(pwd)" >> $env:GITHUB_ENV
- name: Build for Windows
run: |
flutter build windows --release
- name: Delete unnecessary DLL
run: |
rm build\windows\x64\runner\Release\api-ms-*.dll
rm build\windows\x64\runner\Release\concrt140.dll
rm build\windows\x64\runner\Release\msvcp*.dll
rm build\windows\x64\runner\Release\ucrtbas*.dll
rm build\windows\x64\runner\Release\vc*.dll
- name: Get translation files for Inno Setup
run: |
curl -o ${{ env.builddir }}\ChineseSimplified.isl https://raw.githubusercontent.com/jrsoftware/issrc/main/Files/Languages/Unofficial/ChineseSimplified.isl
- name: Compile .ISS to .EXE Installer
uses: Minionguyjpro/[email protected]
with:
path: windows/innosetup.iss
options: /dMyAppVersion="${{ env.version }}" /dMyWorkDir="${{ env.builddir }}" /Qp
- name: Rename .EXE Installer
run: mv miria-installer.exe miria-installer_${env:version}_x64.exe
- name: Compress files
run: |
ren build\windows\x64\runner\Release Miria
Compress-Archive -Path build\windows\x64\runner\Miria -DestinationPath miria_${env:version}_windows-x64.zip -Force
- name: Create tag and release note
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload v${env:version} miria_${env:version}_windows-x64.zip miria-installer_${env:version}_x64.exe