-
Notifications
You must be signed in to change notification settings - Fork 22
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
Build and release pipeline #152
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
cd73d27
Add PHONYs
rtibbles 76a88bf
Defer all version setting to our tooling rather than P4A.
rtibbles 753b27a
For official builds, just show the bare version in the loader screen.
rtibbles 18750e8
Update gradle with release settings and signing.
rtibbles 9a72fdb
Update github action to build code signed assets.
rtibbles 392d235
Add functionality and action to promote internal release to open test…
rtibbles 6c2c570
Ignore key stores and add extra commentary on the usefulness of the b…
rtibbles 946ff23
Register mimetypes and increase socket timeout to ensure upload happe…
rtibbles f725f9a
Update universal apk download to use download_media method.
rtibbles File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Release Android App | ||
|
||
on: | ||
workflow_dispatch: | ||
# Inputs the workflow accepts. | ||
inputs: | ||
version-code: | ||
description: 'The version code to promote to the open testing track' | ||
required: true | ||
type: string | ||
workflow_call: | ||
inputs: | ||
version-code: | ||
description: 'The version code to promote to the open testing track' | ||
required: true | ||
type: string | ||
ref: | ||
description: 'A ref for this workflow to check out its own repo' | ||
required: true | ||
type: string | ||
secrets: | ||
KOLIBRI_ANDROID_PLAY_STORE_API_SERVICE_ACCOUNT_JSON: | ||
required: false | ||
|
||
jobs: | ||
release_apk: | ||
runs-on: ubuntu-latest | ||
env: | ||
SERVICE_ACCOUNT_JSON: '${{ secrets.KOLIBRI_ANDROID_PLAY_STORE_API_SERVICE_ACCOUNT_JSON }}' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
if: ${{ !inputs.ref }} | ||
- uses: actions/checkout@v3 | ||
if: ${{ inputs.ref }} | ||
with: | ||
repository: learningequality/kolibri-android-installer | ||
ref: ${{ inputs.ref }} | ||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.9 | ||
- uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
- name: Install dependencies | ||
run: pip install -r requirements.txt | ||
- name: Release APK | ||
run: python scripts/play_store_api.py release "${{ inputs.version-code }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,3 +36,5 @@ android_root/ | |
|
||
*.apk | ||
.env | ||
.version-code | ||
*.keystore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
cython~=0.29 | ||
virtualenv | ||
git+https://github.com/learningequality/python-for-android@4a3c74caf67cad4495f2352ae56ba2b0f1b266c5#egg=python-for-android | ||
google-api-python-client==2.96.0 | ||
google-auth==2.22.0 | ||
google-auth-httplib2==0.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure about this change as I don't know
p4a
enough. Following the code it looks to me that both version and numeric-version are useless and the apk version is overseed by theversion.upgrade
file that's built forgradle
, but glad to have more information to understand it if that's not corect.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, that's precisely it. P4A bakes this information into the build.gradle file during its bootstrapping of the build process, but I wanted to decouple from P4A as much as possible - mostly to make the Java project files stable, rather than continually changing based on P4A's builds (also it changes the build.gradle depending on whether it's a dev or production build, which didn't work well with committing these files to the repo).