forked from ElishaAz/Sayboard
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Push builds to github artifacts Change-Id: I56430329d8e5f6ed639e6a2af76df77fa40694e6 Signed-off-by: techyminati <[email protected]>
- Loading branch information
1 parent
c7479ef
commit fcab7b9
Showing
1 changed file
with
76 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: Android CI | ||
|
||
on: | ||
push: | ||
branches: [ "volla-14" ] | ||
pull_request: | ||
branches: [ "volla-14" ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- name: set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
cache: gradle | ||
- uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x gradlew | ||
- name: Build with Gradle | ||
run: ./gradlew build && mkdir -p releases && find app/build/ -type f -name \*\.apk -exec mv {} releases/com.volla.vollaboard.apk \; && ls -l releases | ||
|
||
- uses: r0adkll/sign-android-release@v1 | ||
name: Sign app APK | ||
id: sign_app | ||
with: | ||
releaseDirectory: ./releases | ||
signingKeyBase64: ${{ secrets.ANDROID_KEYSTORE_FILE_CONTENTS }} | ||
signedReleaseFile: ./releases/signed | ||
alias: ${{ secrets.ANDROID_KEYSTORE_ALIAS }} | ||
keyStorePassword: ${{ secrets.ANDROID_KEYSTORE_PASS }} | ||
keyPassword: ${{ secrets.ANDROID_KEYSTORE_PASS }} | ||
|
||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: com.volla.vollaboard.apk | ||
path: ${{ steps.sign_app.outputs.signedReleaseFile }} | ||
|
||
- name: Upload Apk to Nightly Repository | ||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} | ||
uses: wlixcc/[email protected] | ||
with: | ||
username: 'drone' | ||
server: 'volla.tech' | ||
port: 22 | ||
ssh_private_key: '${{ secrets.FDROID_DEPLOY_KEY }}' | ||
local_path: ${{ steps.sign_app.outputs.signedReleaseFile }} | ||
remote_path: '/fdroid-nightly.volla.tech/builds/volla/vollaboard/' | ||
args: '-o CheckHostIP=no -o StrictHostKeyChecking=no' | ||
|
||
- name: Upload Apk to Release Repository | ||
if: ${{ startsWith(github.ref, 'refs/tags/v') }} | ||
uses: wlixcc/[email protected] | ||
with: | ||
username: 'drone' | ||
server: 'volla.tech' | ||
port: 22 | ||
ssh_private_key: '${{ secrets.FDROID_DEPLOY_KEY }}' | ||
local_path: ${{ steps.sign_app.outputs.signedReleaseFile }} | ||
remote_path: '/fdroid.volla.tech/builds/volla/vollaboard/' | ||
args: '-o CheckHostIP=no -o StrictHostKeyChecking=no' |