mirror of
https://codeberg.org/mi6e4ka/openstore.git
synced 2025-06-28 12:09:57 +00:00
Sign apk by dedicated build step
This commit is contained in:
parent
6d2ab2e473
commit
0acc8bd157
1 changed files with 24 additions and 12 deletions
|
@ -84,27 +84,39 @@ jobs:
|
|||
|
||||
# 6. Собираем подписанный APK
|
||||
|
||||
- name: Cache Build
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
./android/.gradle
|
||||
~/.gradle
|
||||
key: ${{ runner.os }}-android-${{ hashFiles('android/') }}
|
||||
# - name: Cache Build
|
||||
# uses: actions/cache@v3
|
||||
# with:
|
||||
# path: |
|
||||
# ./android/.gradle
|
||||
# ~/.gradle
|
||||
# key: ${{ runner.os }}-android-${{ hashFiles('android/') }}
|
||||
|
||||
- name: Build signed APK
|
||||
- name: Build unsigned APK
|
||||
run: |
|
||||
./flutter/bin/flutter build apk --release --split-per-abi -v
|
||||
|
||||
- uses: https://github.com/ilharp/sign-android-release@v2
|
||||
id: sign_app
|
||||
with:
|
||||
releaseDirectory: build/app/outputs/flutter-apk
|
||||
signingKeyBase64: ${{ secrets.KEYSTORE_BASE64 }}
|
||||
alias: uploads
|
||||
keyStorePassword: ${{ secrets.KEY_PASSWORD }}
|
||||
keyPassword: ${{ secrets.KEY_PASSWORD }}
|
||||
|
||||
- name: Print build dir
|
||||
run: pwd
|
||||
|
||||
- name: List release files
|
||||
run: ls build/app/outputs/flutter-apk
|
||||
|
||||
# 7. Сохраняем артефакты
|
||||
- name: Upload release apk
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: app-release
|
||||
path: build/app/outputs/flutter-apk/*-release.apk
|
||||
path: build/app/outputs/flutter-apk/*-signed.apk
|
||||
|
||||
- name: Get Release ID
|
||||
id: get_release
|
||||
|
@ -122,15 +134,15 @@ jobs:
|
|||
run: |
|
||||
curl -X POST -H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
||||
-H "Content-Type: multipart/form-data" \
|
||||
-F "attachment=@build/app/outputs/flutter-apk/app-arm64-v8a-release.apk" \
|
||||
-F "attachment=@build/app/outputs/flutter-apk/app-arm64-v8a-release-signed.apk" \
|
||||
"${{ env.GITHUB_API_URL }}/repos/${{ env.GITHUB_REPOSITORY }}/releases/${{ steps.get_release.outputs.release_id }}/assets?name=app-arm64-v8a-release.apk"
|
||||
|
||||
curl -X POST -H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
||||
-H "Content-Type: multipart/form-data" \
|
||||
-F "attachment=@build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk" \
|
||||
-F "attachment=@build/app/outputs/flutter-apk/app-armeabi-v7a-release-signed.apk" \
|
||||
"${{ env.GITHUB_API_URL }}/repos/${{ env.GITHUB_REPOSITORY }}/releases/${{ steps.get_release.outputs.release_id }}/assets?name=app-armeabi-v7a-release.apk"
|
||||
|
||||
curl -X POST -H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
||||
-H "Content-Type: multipart/form-data" \
|
||||
-F "attachment=@build/app/outputs/flutter-apk/app-x86_64-release.apk" \
|
||||
-F "attachment=@build/app/outputs/flutter-apk/app-x86_64-release-signed.apk" \
|
||||
"${{ env.GITHUB_API_URL }}/repos/${{ env.GITHUB_REPOSITORY }}/releases/${{ steps.get_release.outputs.release_id }}/assets?name=app-x86_64-release.apk"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue