mirror of
https://codeberg.org/mi6e4ka/openstore.git
synced 2025-06-28 20:19:58 +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
|
# 6. Собираем подписанный APK
|
||||||
|
|
||||||
- name: Cache Build
|
# - name: Cache Build
|
||||||
uses: actions/cache@v3
|
# uses: actions/cache@v3
|
||||||
with:
|
# with:
|
||||||
path: |
|
# path: |
|
||||||
./android/.gradle
|
# ./android/.gradle
|
||||||
~/.gradle
|
# ~/.gradle
|
||||||
key: ${{ runner.os }}-android-${{ hashFiles('android/') }}
|
# key: ${{ runner.os }}-android-${{ hashFiles('android/') }}
|
||||||
|
|
||||||
- name: Build signed APK
|
- name: Build unsigned APK
|
||||||
run: |
|
run: |
|
||||||
./flutter/bin/flutter build apk --release --split-per-abi -v
|
./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
|
- name: Print build dir
|
||||||
run: pwd
|
run: pwd
|
||||||
|
|
||||||
|
- name: List release files
|
||||||
|
run: ls build/app/outputs/flutter-apk
|
||||||
|
|
||||||
# 7. Сохраняем артефакты
|
# 7. Сохраняем артефакты
|
||||||
- name: Upload release apk
|
- name: Upload release apk
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: app-release
|
name: app-release
|
||||||
path: build/app/outputs/flutter-apk/*-release.apk
|
path: build/app/outputs/flutter-apk/*-signed.apk
|
||||||
|
|
||||||
- name: Get Release ID
|
- name: Get Release ID
|
||||||
id: get_release
|
id: get_release
|
||||||
|
@ -122,15 +134,15 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
curl -X POST -H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
curl -X POST -H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
||||||
-H "Content-Type: multipart/form-data" \
|
-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"
|
"${{ 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 }}" \
|
curl -X POST -H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
||||||
-H "Content-Type: multipart/form-data" \
|
-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"
|
"${{ 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 }}" \
|
curl -X POST -H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
|
||||||
-H "Content-Type: multipart/form-data" \
|
-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"
|
"${{ 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