Skip to content

Commit 3b8f753

Browse files
committed
Move from Travis to GHA, start autopublishing to Play Store
1 parent 91d0406 commit 3b8f753

File tree

3 files changed

+64
-25
lines changed

3 files changed

+64
-25
lines changed

.github/workflows/ci.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: CI
2+
on: [push, pull_request]
3+
jobs:
4+
build:
5+
name: Build
6+
runs-on: ubuntu-18.04
7+
steps:
8+
- uses: actions/checkout@v2
9+
10+
- name: Set up JDK 1.8
11+
uses: actions/setup-java@v1
12+
with:
13+
java-version: 1.8
14+
15+
- name: Setup Android SDK
16+
uses: android-actions/setup-android@v2
17+
18+
- name: Build release
19+
run: ./gradlew assembleRelease
20+
21+
- uses: actions/upload-artifact@v2
22+
with:
23+
name: unsigned-app.apk
24+
path: app/build/outputs/apk/release/app-release-unsigned.apk
25+
if-no-files-found: error
26+
27+
deploy:
28+
name: Deploy to GitHub Releases
29+
needs: build
30+
runs-on: ubuntu-18.04
31+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
32+
steps:
33+
- name: Get the APK
34+
uses: actions/download-artifact@v2
35+
with:
36+
name: unsigned-app.apk
37+
path: .
38+
39+
- uses: r0adkll/sign-android-release@v1
40+
name: Sign the APK
41+
id: sign_app
42+
with:
43+
releaseDirectory: .
44+
signingKeyBase64: ${{ secrets.ANDROID_SIGNING_KEY }}
45+
alias: ${{ secrets.SIGNING_KEY_ALIAS }}
46+
keyStorePassword: ${{ secrets.SIGNING_KEY_STORE_PASSWORD }}
47+
keyPassword: ${{ secrets.SIGNING_KEY_PASSWORD }}
48+
49+
- name: Publish the APK to GitHub Releases
50+
uses: svenstaro/upload-release-action@v2
51+
with:
52+
prerelease: true
53+
asset_name: httptoolkit.apk
54+
file: ${{ steps.sign_app.outputs.signedReleaseFile }}
55+
tag: ${{ github.ref }}
56+
repo_token: ${{ secrets.GITHUB_TOKEN }}
57+
58+
- name: Publish the APK to Google Play
59+
uses: r0adkll/upload-google-play@v1
60+
with:
61+
serviceAccountJsonPlainText: ${{ secrets.PLAY_SERVICE_ACCOUNT_JSON }}
62+
packageName: tech.httptoolkit.android.v1
63+
releaseFiles: ${{ steps.sign_app.outputs.signedReleaseFile }}
64+
track: production

.travis.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

android-travis-cert-store.enc

-2.59 KB
Binary file not shown.

0 commit comments

Comments
 (0)