alaskartv-app/.github/workflows/publish.yml
2025-01-04 22:46:04 +03:00

69 lines
2.1 KiB
YAML

name: Publish to Google Play
on:
workflow_dispatch:
jobs:
publish:
runs-on: docker
container: ghcr.io/catthehacker/ubuntu:act-latest
permissions:
actions: read
contents: read
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Get latest successful run ID
id: get-run
run: |
LATEST_RUN=$(curl -s -H "Authorization: token ${FORGEJO_TOKEN}" \
"https://git.askar.tv/api/v1/repos/nomad/alaskartv-app/actions/runs?status=success&event=push&branch=main" | \
jq -r '.[] | select(.workflow_id=="main.yml") | .id' | head -n1)
echo "run_id=$LATEST_RUN" >> "$GITHUB_OUTPUT"
- name: Test API
env:
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
run: |
curl -v -H "Authorization: Bearer ${FORGEJO_TOKEN}" \
"https://git.askar.tv/api/actions_pipeline/_apis/pipelines/workflows/main.yml/runs?status=success"
- name: Download Signed AAB
uses: actions/download-artifact@v3
with:
name: signed-aab
run-id: ${{ steps.get-run.outputs.run_id }}
path: ./release
- name: Download Debug Symbols
uses: actions/download-artifact@v3
with:
workflow: .github/workflows/main.yml
workflow_conclusion: success
name: debug-symbols
path: ./release/symbols
- name: Use What's New Message
run: |
mkdir ./release/whatsnew
cp whatsnew.txt ./release/whatsnew/whatsnew-en-US
- name: List Downloaded Files
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