Skip to content

Commit

Permalink
Travis out, GH Actions in
Browse files Browse the repository at this point in the history
  • Loading branch information
devgianlu committed Jan 11, 2021
1 parent b22fa7b commit 608d6c0
Show file tree
Hide file tree
Showing 10 changed files with 105 additions and 72 deletions.
4 changes: 4 additions & 0 deletions .github/decrypt_secrets.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh

gpg --quiet --batch --yes --decrypt --passphrase="$SECRETS_GPG_PASS" --output .github/secrets.tar .github/secrets.tar.gpg
tar xvf .github/secrets.tar -C .github
Binary file added .github/secrets.tar.gpg
Binary file not shown.
59 changes: 59 additions & 0 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Android CI

on:
push:
branches: [ master ]
tags:
- 'v*'
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Grant execute permission to scripts
run: chmod +x gradlew .github/decrypt_secrets.sh
- name: Decrypt GPG secrets
run: .github/decrypt_secrets.sh
env:
SECRETS_GPG_PASS: ${{ secrets.SECRETS_GPG_PASS }}
- name: Build with Gradle
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
run: ./gradlew connectedCheck --no-daemon
- name: Publish with Gradle
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
run: ./gradlew assembleRelease publish --no-daemon
env:
KEYSTORE_STORE_PASS: ${{ secrets.KEYSTORE_STORE_PASS }}
KEYSTORE_KEY_ALIAS: gianlu
KEYSTORE_KEY_PASS: ${{ secrets.KEYSTORE_KEY_PASS }}
- name: Create release
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body_path: app/src/main/play/release-notes/en-GB/production.txt
draft: true
prerelease: false
- name: Upload APK file
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: app/build/outputs/apk/foss/release/app-foss-release.apk
asset_name: app-foss-release.apk
asset_content_type: application/vnd.android.package-archive
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,4 @@ local.properties
/app/build
captures
Thumbs.db
/app/**/release/
google-services.json
!/app/src/foss/google-services.json
/app/**/release/
41 changes: 0 additions & 41 deletions .travis.yml

This file was deleted.

8 changes: 0 additions & 8 deletions .travis/build.sh

This file was deleted.

19 changes: 0 additions & 19 deletions .travis/github-release.sh

This file was deleted.

Binary file removed .travis/secrets.tar.enc
Binary file not shown.
40 changes: 40 additions & 0 deletions app/src/standard/google-services.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"project_info": {
"project_number": "224100428237",
"firebase_url": "https://aria2app-android.firebaseio.com",
"project_id": "aria2app-android",
"storage_bucket": "aria2app-android.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:224100428237:android:af6ff887b27c8100177c84",
"android_client_info": {
"package_name": "com.gianlu.aria2app"
}
},
"oauth_client": [
{
"client_id": "224100428237-6ju7ske3ii9pj886psj2h3tipm470jko.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyBNfaEjfRWN0UoIdUxcFxaXAQ0cldOj5Jk"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "224100428237-6ju7ske3ii9pj886psj2h3tipm470jko.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}

0 comments on commit 608d6c0

Please sign in to comment.