rename release files

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-10-18 12:09:15 +08:00
parent 464f008023
commit 3ae3955f53
7 changed files with 115 additions and 92 deletions

View File

@@ -1,18 +1,18 @@
name: Android Release
name: Build for Android
on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
paths-ignore:
- "**.md"
workflow_call:
inputs:
sign:
description: "sign"
required: false
default: true
type: boolean
workflow_dispatch:
jobs:
android:
name: Release Android
runs-on: ubuntu-latest
steps:
@@ -48,7 +48,7 @@ jobs:
# run: flutter pub get
- name: Write key
if: github.event_name != 'pull_request'
if: ${{ github.event_name == 'workflow_dispatch' || (github.event_name == 'workflow_call' && inputs.sign == 'true') }}
run: |
if [ ! -z "${{ secrets.SIGN_KEYSTORE_BASE64 }}" ]; then
echo "${{ secrets.SIGN_KEYSTORE_BASE64 }}" | base64 --decode > android/app/key.jks
@@ -65,23 +65,31 @@ jobs:
- name: flutter build apk
run: flutter build apk --release --split-per-abi --dart-define-from-file=pili_release.json --pub
- name: rename
run: |
for file in build/app/outputs/flutter-apk/app-*-release.apk; do
abi=$(echo "$file" | sed -E 's|.*app-(.*)-release\.apk|\1|')
mv "$file" "PiliPlus_android_${{ env.version }}_${abi}.apk"
done
shell: bash
- name: 上传
uses: actions/upload-artifact@v4
with:
name: app-arm64-v8a
path: |
build/app/outputs/flutter-apk/app-arm64-v8a-release.apk
PiliPlus_android_*_arm64-v8a.apk
- name: 上传
uses: actions/upload-artifact@v4
with:
name: app-armeabi-v7a
path: |
build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk
PiliPlus_android_*_armeabi-v7a.apk
- name: 上传
uses: actions/upload-artifact@v4
with:
name: app-x86_64
path: |
build/app/outputs/flutter-apk/app-x86_64-release.apk
PiliPlus_android_*_x86_64.apk

75
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,75 @@
name: Build
on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
paths-ignore:
- "**.md"
workflow_dispatch:
inputs:
build_android:
description: "Build Android"
required: false
default: true
type: boolean
build_ios:
description: "Build iOS"
required: false
default: true
type: boolean
build_mac:
description: "Build Mac"
required: false
default: true
type: boolean
build_win_x64:
description: "Build Win-x64"
required: false
default: true
type: boolean
build_linux_x64:
description: "Build Linux-x64"
required: false
default: true
type: boolean
build_linux_arm64:
description: "Build Linux-arm64"
required: false
default: true
type: boolean
jobs:
android:
if: ${{ github.event_name == 'pull_request' || github.event.inputs.build_android == 'true' }}
uses: ./.github/workflows/android.yml
with:
sign: ${{ github.event_name != 'pull_request' }}
ios:
if: ${{ github.event_name == 'pull_request' || github.event.inputs.build_ios == 'true' }}
uses: ./.github/workflows/ios.yml
mac:
if: ${{ github.event_name == 'pull_request' || github.event.inputs.build_mac == 'true' }}
uses: ./.github/workflows/mac.yml
win_x64:
if: ${{ github.event_name == 'pull_request' || github.event.inputs.build_win_x64 == 'true' }}
uses: ./.github/workflows/win_x64.yml
linux_x64:
if: ${{ github.event_name == 'pull_request' || github.event.inputs.build_linux_x64 == 'true' }}
uses: ./.github/workflows/linux_x64.yml
linux_arm64:
if: ${{ github.event_name == 'pull_request' || github.event.inputs.build_linux_arm64 == 'true' }}
uses: ./.github/workflows/linux_arm64.yml

View File

@@ -1,19 +1,8 @@
name: Build for iOS
on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
paths-ignore:
- "**.md"
workflow_call:
workflow_dispatch:
inputs:
branch:
required: false
default: "main"
jobs:
build-macos-app:
@@ -23,7 +12,6 @@ jobs:
- name: Checkout code
uses: actions/checkout@v5
with:
ref: ${{ github.event.inputs.branch }}
fetch-depth: 0
- name: Setup flutter
@@ -40,10 +28,10 @@ jobs:
run: |
flutter build ios --release --no-codesign --dart-define-from-file=pili_release.json
ln -sf ./build/ios/iphoneos Payload
zip -r9 ios-release-no-sign.ipa Payload/runner.app
zip -r9 PiliPlus_ios_${{env.version}}.ipa Payload/runner.app
- name: Upload ios release
uses: actions/upload-artifact@v4
with:
name: ios-release
path: ios-release-no-sign.ipa
path: PiliPlus_ios_*.ipa

View File

@@ -1,29 +1,17 @@
name: Build for Linux Arm64
on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
paths-ignore:
- "**.md"
workflow_call:
workflow_dispatch:
inputs:
branch:
required: false
default: "main"
jobs:
build-linux-app:
name: Release Linux
name: Release Linux Arm64
runs-on: ubuntu-24.04-arm
steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
ref: ${{ github.event.inputs.branch }}
fetch-depth: 0
- name: Install dependencies

View File

@@ -1,29 +1,17 @@
name: Build for Linux x64
on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
paths-ignore:
- "**.md"
workflow_call:
workflow_dispatch:
inputs:
branch:
required: false
default: "main"
jobs:
build-linux-app:
name: Release Linux
name: Release Linux x64
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
ref: ${{ github.event.inputs.branch }}
fetch-depth: 0
- name: Install dependencies

View File

@@ -1,19 +1,8 @@
name: Build for Mac
on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
paths-ignore:
- "**.md"
workflow_call:
workflow_dispatch:
inputs:
branch:
required: false
default: "main"
jobs:
build-mac-app:
@@ -23,7 +12,6 @@ jobs:
- name: Checkout code
uses: actions/checkout@v5
with:
ref: ${{ github.event.inputs.branch }}
fetch-depth: 0
- name: Setup flutter
@@ -52,4 +40,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: macos-release
path: PiliPlus*.dmg
path: PiliPlus_macos_*.dmg

View File

@@ -1,29 +1,17 @@
name: Build for Windows x64
on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
paths-ignore:
- "**.md"
workflow_call:
workflow_dispatch:
inputs:
branch:
required: false
default: "main"
jobs:
build-windows-app:
name: Release Windows
name: Release Windows x64
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
ref: ${{ github.event.inputs.branch }}
fetch-depth: 0
- name: Setup flutter
@@ -55,12 +43,12 @@ jobs:
mkdir -p Release/PiliPlus-Win
mkdir -p PiliPlus-Win-Setup
mv build/windows/x64/runner/Release/* Release/PiliPlus-Win/
mv dist/**/*.exe PiliPlus-Win-Setup/PiliPlus-${{env.version}}-Windows-x64-Setup.exe
mv dist/**/*.exe PiliPlus-Win-Setup/PiliPlus_windows_${{env.version}}_x64_setup.exe
- name: Upload windows file release
uses: actions/upload-artifact@v4
with:
name: windows-x64-release
name: PiliPlus_windows_${{env.version}}_x64
path: Release
- name: Upload windows setup release