This commit is contained in:
kodjomoustapha 2023-11-29 18:09:35 +01:00
parent 3dd8c8f14b
commit 33d4a61e4c
2 changed files with 51 additions and 50 deletions

View file

@ -184,59 +184,59 @@ jobs:
allowUpdates: true
build-and-release-windows-zip:
permissions:
contents: write
runs-on: windows-latest
steps:
# build-and-release-windows-zip:
# permissions:
# contents: write
# runs-on: windows-latest
# steps:
- name: checkout branch
uses: actions/checkout@v3
# - name: checkout branch
# uses: actions/checkout@v3
- name: setup flutter
uses: subosito/flutter-action@v2.10.0
with:
channel: 'stable'
# - name: setup flutter
# uses: subosito/flutter-action@v2.10.0
# with:
# channel: 'stable'
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
# - name: Setup Rust toolchain
# uses: dtolnay/rust-toolchain@stable
- name: Setup Protobuf compiler
uses: arduino/setup-protoc@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
# - name: Setup Protobuf compiler
# uses: arduino/setup-protoc@v2
# with:
# repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install the CLI tool
run: cargo install rinf
# - name: Install the CLI tool
# run: cargo install rinf
- name: Generate message files
run: rinf message
# - name: Generate message files
# run: rinf message
- name: flutter pub get
run: |
git config --global core.longpaths true
flutter pub get
# - name: flutter pub get
# run: |
# git config --global core.longpaths true
# flutter pub get
- name: build windows
run: |
flutter build windows --release
$DestDir = "build\windows\Mangayomi-${{ github.ref_name }}-windows"
$SrcDir = "build\windows\runner\Release"
New-Item -Path $DestDir -ItemType Directory
Copy-Item $SrcDir\* -Recurse $DestDir
Copy-Item -Filter *.dll -Path windows\* -Destination $DestDir -Force
Compress-Archive $DestDir build\windows\Mangayomi-${{ github.ref_name }}-windows.zip
# - name: build windows
# run: |
# flutter build windows --release
# $DestDir = "build\windows\Mangayomi-${{ github.ref_name }}-windows"
# $SrcDir = "build\windows\runner\Release"
# New-Item -Path $DestDir -ItemType Directory
# Copy-Item $SrcDir\* -Recurse $DestDir
# Copy-Item -Filter *.dll -Path windows\* -Destination $DestDir -Force
# Compress-Archive $DestDir build\windows\Mangayomi-${{ github.ref_name }}-windows.zip
- name: upload artifact windows zip
uses: actions/upload-artifact@v3
with:
path: build\windows\Mangayomi-*.zip
# - name: upload artifact windows zip
# uses: actions/upload-artifact@v3
# with:
# path: build\windows\Mangayomi-*.zip
- name: release package windows zip
uses: ncipollo/release-action@v1
with:
artifacts: build\windows\Mangayomi-*.zip
allowUpdates: true
# - name: release package windows zip
# uses: ncipollo/release-action@v1
# with:
# artifacts: build\windows\Mangayomi-*.zip
# allowUpdates: true
build-and-release-linux-zip:

View file

@ -82,11 +82,12 @@ class BackupAndRestore extends ConsumerWidget {
TextButton(
onPressed: () async {
// if (isIOS) {
// ref.watch(doBackUpProvider(
// list: indexList,
// path: autoBackupLocation.$1,
// context: context));
// ref.watch(doBackUpProvider(
// list: indexList,
// path: autoBackupLocation.$1,
// context: context));
// } else {
final result = await FilePicker.platform
.getDirectoryPath();
@ -95,8 +96,8 @@ class BackupAndRestore extends ConsumerWidget {
list: indexList,
path: result,
context: context));
}
// }
// }
}
},
child: Text(
l10n.ok,
@ -355,7 +356,7 @@ class BackupAndRestore extends ConsumerWidget {
),
),
// if (isIOS)
ListBackupFilesFromDirectory(directory: autoBackupLocation.$1),
// ListBackupFilesFromDirectory(directory: autoBackupLocation.$1),
ListTile(
title: Padding(
padding: const EdgeInsets.only(bottom: 8),