Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f7377406df |
@@ -1,5 +1,9 @@
|
|||||||
name: Android build
|
name: Android build
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
releases: write
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
@@ -82,10 +86,17 @@ jobs:
|
|||||||
path: app/build/outputs/apk/debug/*.apk
|
path: app/build/outputs/apk/debug/*.apk
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Upload release AAB
|
- name: Attach release AAB to Gitea release
|
||||||
if: github.event_name == 'release'
|
if: github.event_name == 'release'
|
||||||
uses: actions/upload-artifact@v3
|
env:
|
||||||
with:
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
||||||
name: release-aab
|
shell: bash
|
||||||
path: app/build/outputs/bundle/release/*.aab
|
run: |
|
||||||
if-no-files-found: error
|
set -euxo pipefail
|
||||||
|
release_id="$(python3 -c 'import json, os; print(json.load(open(os.environ["GITHUB_EVENT_PATH"], encoding="utf-8"))["release"]["id"])')"
|
||||||
|
aab="$(find app/build/outputs/bundle/release -name '*.aab' | head -n 1)"
|
||||||
|
curl --fail-with-body \
|
||||||
|
--request POST \
|
||||||
|
--header "Authorization: token ${GITEA_TOKEN}" \
|
||||||
|
--form "attachment=@${aab}" \
|
||||||
|
"${GITHUB_SERVER_URL}/api/v1/repos/${GITHUB_REPOSITORY}/releases/${release_id}/assets?name=$(basename "$aab")"
|
||||||
|
|||||||
Reference in New Issue
Block a user