forked from lucinhu/bili_you
-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (82 loc) · 3.23 KB
/
manual.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: builder
# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on:
workflow_dispatch:
# Inputs the workflow accepts.
inputs:
name:
# Friendly description to be shown in the UI instead of 'name'
description: 'Person to greet'
# Default value if no value is explicitly provided
default: 'World'
# Input has to be provided for the workflow to run
required: true
# The data type of the input
type: string
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
# Runs a single command using the runners shell
- name: Setup Java JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: "17"
token: ${{secrets.GITHUB_TOKEN}}
- name: Flutter action
uses: subosito/flutter-action@v2
with:
flutter-version: 3.10.3
channel: stable
- name: Decode keystore
run: |
echo $ENCODED_KEYSTORE | base64 -di > android/app/keystore.jks
env:
ENCODED_KEYSTORE: ${{ secrets.KEYSTORE }}
- run: flutter pub get
# 打包apk
- name: Collect Apks
run: flutter build apk --release --split-per-abi
env:
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.KEY_PASSWORD}}
- name: Build Linux-x64
run:
sudo apt-get update -y
sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev libunwind-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev binutils coreutils desktop-file-utils fakeroot fuse libgdk-pixbuf2.0-dev patchelf python3-pip python3-setuptools squashfs-tools strace util-linux zsync
flutter build linux --release --target-platform linux-x64
rm -rf AppDir || true
cp -r build/linux/x64/release/bundle AppDir
wget -O appimage-builder-x86_64.AppImage https://github.com/AppImageCrafters/appimage-builder/releases/download/v1.0.0-beta.1/appimage-builder-1.0.0-677acbd-x86_64.AppImage
chmod +x appimage-builder-x86_64.AppImage
sudo mv appimage-builder-x86_64.AppImage /usr/local/bin/appimage-builder
appimage-builder --recipe AppImageBuilder.yml
- name: Release Packages
uses: ncipollo/release-action@main
if: ${{ env.PACKAGED_STATUS }} == 'success' && !cancelled()
with:
tag: v1.1.5
artifacts: "build/app/outputs/flutter-apk/app-*.apk"
allowUpdates: true
removeArtifacts: false
replacesArtifacts: true
token: ${{ secrets.GITHUB_TOKEN }}
body: |
Test
- name: Release Packages
uses: ncipollo/release-action@main
if: ${{ env.PACKAGED_STATUS }} == 'success' && !cancelled()
with:
tag: v1.1.5+linux-x64
artifacts: "AppDir/*.Appimage"
allowUpdates: true
removeArtifacts: false
replacesArtifacts: true
token: ${{ secrets.GITHUB_TOKEN }}
body: |
Test