Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/apk download #70

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from
39 changes: 39 additions & 0 deletions .github/workflows/android-apk-download.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Create android release AAB and upload play store

# Required Secrets
# - GOOGLE_PLAY_SERVICE_ACCOUNT_JSON

name: Android - Release to Google Play
on:
# release:
# types: [published]
workflow_dispatch:
push:
branches:
- feat/apk-download
jobs:
android_apk_export:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
lfs: true
ref: '${{github.event.inputs.build_branch}}'
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: '16'
- name: Download android apk
id: download
uses: ./.github/workflows/android-apk-download # Uses an action in the root directory
with:
serviceAccountJsonPlainText: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON }}
packageName: io.picsa.extension
versionCode: 3010000
env:
GOOGLE_PLAY_SERVICE_ACCOUNT_JSON: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_JSON }}
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: apk
path: ${{ steps.download.outputs.apkFile }}
22 changes: 22 additions & 0 deletions .github/workflows/android-apk-download/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

The MIT License (MIT)

Copyright (c) 2018 GitHub, Inc. and contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
6 changes: 6 additions & 0 deletions .github/workflows/android-apk-download/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Android APK Download

**Work in Progress**

Custom github action to download github universal apk
Adapted from https://github.com/r0adkll/upload-google-play
22 changes: 22 additions & 0 deletions .github/workflows/android-apk-download/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: 'Download Universal APK from Google Play'
description: 'An action to download the created universal apk following upload to Google Play Developer Console'
author: 'chrismclarke'
inputs:
serviceAccountJson:
description: 'The service account json private key file to authorize the upload request'
required: false
serviceAccountJsonPlainText:
description: 'The raw json text of the service account private key to authorize the upload request'
required: false
packageName:
description: 'The package name, or Application Id, of the app you are uploading'
required: true
versionCode:
description: 'The application version code (number) of the apk to be exported'
required: true
outputs:
apkFile:
description: 'Exported apk file'
runs:
using: 'node16'
main: 'lib/index.js'
4 changes: 4 additions & 0 deletions .github/workflows/android-apk-download/lib/index.js

Large diffs are not rendered by default.

Loading