Skip to content

Commit

Permalink
Merge remote-tracking branch 'releasetesting/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
mendhak committed Mar 27, 2024
2 parents 0dfe13e + be68a37 commit 3929b8a
Show file tree
Hide file tree
Showing 2 changed files with 87 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/generate-release-apk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Build and Release App Bundle

# Run on workflow dispatch or a tag
on:
push:
tags:
- '*'
workflow_dispatch:


jobs:
build:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- id: install-gpg-signing-key
name: Install GPG signing key
run: |
# Install gpg signing key
cat <(echo -e "${{ secrets.GPG_SIGNING_SECRET_KEY }}") | gpg --batch --import > /dev/null 2>&1
- name: Checkout
uses: actions/checkout@v1
- name: Decode Keystore
run: |
mkdir -p gpslogger/keystore
echo "${{ secrets.KEYSTORE }}" | base64 --decode > gpslogger/keystore/your_signing_keystore.jks
shell: bash
- name: Set up Java 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Assemble APK
run: ./gradlew assembleRelease
env:
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
- name: Sign and Checksum APK
run: ./gradlew copyFinalAPK -Psigning.gnupg.passphrase=${{ secrets.GPG_SIGNING_PASSWORD }} -Psigning.gnupg.executable=gpg
- name: List the files
run: |
tree gpslogger/build/outputs/
ls -lah gpslogger/
- name: Upload
uses: actions/upload-artifact@v4
with:
name: Build Artifacts
path: |
gpslogger/gpslogger-*.apk
gpslogger/gpslogger-*.apk.asc
gpslogger/gpslogger-*.apk.SHA256
- name: Create a Release
id: create-release
uses: softprops/action-gh-release@v2
if: contains(github.ref, '-rc') && startsWith(github.ref, 'refs/tags/')
with:
prerelease: ${{ contains(github.ref, '-rc') && startsWith(github.ref, 'refs/tags/') }}
make_latest: true
files: |
gpslogger/gpslogger-*.apk
gpslogger/gpslogger-*.apk.asc
gpslogger/gpslogger-*.apk.SHA256
19 changes: 19 additions & 0 deletions gpslogger/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ android {
keyAlias RELEASE_KEY_ALIAS
keyPassword RELEASE_KEY_PASSWORD
}


}

buildTypes {
Expand All @@ -94,6 +96,23 @@ android {
}
}
}
else if (System.getenv("SIGNING_STORE_PASSWORD") != null) {
signingConfigs {
release {
storeFile = file("${projectDir}/keystore/your_signing_keystore.jks")
storePassword System.getenv("SIGNING_STORE_PASSWORD")
keyAlias System.getenv("SIGNING_KEY_ALIAS")
keyPassword System.getenv("SIGNING_KEY_PASSWORD")
}
}

buildTypes {
release {
signingConfig signingConfigs.release
}
}
}


}

Expand Down

0 comments on commit 3929b8a

Please sign in to comment.