2024-12-16 00:51:10 +00:00
|
|
|
name: Publish to Google Play
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
publish:
|
2025-01-04 13:25:49 +00:00
|
|
|
runs-on: docker
|
2025-01-04 18:26:51 +00:00
|
|
|
container: ghcr.io/catthehacker/ubuntu:act-latest
|
2024-12-16 02:16:50 +00:00
|
|
|
permissions:
|
|
|
|
actions: read
|
|
|
|
contents: read
|
2024-12-16 00:51:10 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout Repository
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
2025-01-04 19:36:56 +00:00
|
|
|
- name: Get latest successful run ID
|
|
|
|
id: get-run
|
|
|
|
run: |
|
|
|
|
LATEST_RUN=$(curl -s -H "Authorization: token ${FORGEJO_TOKEN}" \
|
2025-01-04 19:40:27 +00:00
|
|
|
"https://git.askar.tv/api/v1/repos/nomad/alaskartv-app/actions/runs?status=success&event=push&branch=main" | \
|
2025-01-04 19:36:56 +00:00
|
|
|
jq -r '.[] | select(.workflow_id=="main.yml") | .id' | head -n1)
|
|
|
|
echo "run_id=$LATEST_RUN" >> "$GITHUB_OUTPUT"
|
|
|
|
|
2025-01-04 19:42:34 +00:00
|
|
|
- name: Test API
|
2025-01-04 19:46:04 +00:00
|
|
|
env:
|
2025-01-04 19:48:27 +00:00
|
|
|
MY_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
|
2025-01-04 19:42:34 +00:00
|
|
|
run: |
|
2025-01-04 19:48:27 +00:00
|
|
|
curl -v -H "Authorization: token $MY_TOKEN" \
|
|
|
|
"https://git.askar.tv/api/v1/repos/${{ github.repository }}/actions/runs"
|
2025-01-04 19:42:34 +00:00
|
|
|
|
2024-12-16 00:51:10 +00:00
|
|
|
- name: Download Signed AAB
|
2025-01-04 19:11:34 +00:00
|
|
|
uses: actions/download-artifact@v3
|
2024-12-16 00:51:10 +00:00
|
|
|
with:
|
|
|
|
name: signed-aab
|
2025-01-04 19:36:56 +00:00
|
|
|
run-id: ${{ steps.get-run.outputs.run_id }}
|
2024-12-16 00:51:10 +00:00
|
|
|
path: ./release
|
|
|
|
|
2025-01-04 13:29:40 +00:00
|
|
|
|
2024-12-16 01:56:06 +00:00
|
|
|
- name: Download Debug Symbols
|
2025-01-04 19:07:42 +00:00
|
|
|
uses: actions/download-artifact@v3
|
2024-12-16 01:56:06 +00:00
|
|
|
with:
|
2025-01-04 19:30:35 +00:00
|
|
|
workflow: .github/workflows/main.yml
|
2024-12-16 02:13:56 +00:00
|
|
|
workflow_conclusion: success
|
2024-12-16 01:56:06 +00:00
|
|
|
name: debug-symbols
|
|
|
|
path: ./release/symbols
|
|
|
|
|
2024-12-16 02:24:31 +00:00
|
|
|
- name: Use What's New Message
|
|
|
|
run: |
|
2024-12-16 03:54:10 +00:00
|
|
|
mkdir ./release/whatsnew
|
2024-12-16 03:54:36 +00:00
|
|
|
cp whatsnew.txt ./release/whatsnew/whatsnew-en-US
|
2024-12-16 02:24:31 +00:00
|
|
|
|
2024-12-16 00:51:10 +00:00
|
|
|
- name: List Downloaded Files
|
2025-01-04 13:25:49 +00:00
|
|
|
run: ls -laR ./release
|
|
|
|
|
|
|
|
# - name: Create service_account.json
|
|
|
|
# run: echo '${{ secrets.SERVICE_ACCOUNT_JSON }}' > service_account.json
|
|
|
|
#
|
|
|
|
# - name: Deploy to Google Play
|
|
|
|
# uses: https://github.com/r0adkll/upload-google-play@v1
|
|
|
|
# with:
|
|
|
|
# serviceAccountJson: service_account.json
|
|
|
|
# packageName: org.askartv.tv
|
|
|
|
# releaseFiles: "./release/*.aab"
|
|
|
|
# debugSymbols: "./release/symbols"
|
|
|
|
# track: production
|
|
|
|
# status: completed
|
|
|
|
# whatsNewDirectory: ./release/whatsnew
|
2024-12-16 00:51:10 +00:00
|
|
|
|