Update build.yml #856
Workflow file for this run
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
name: Build | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: set up JDK 16 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 16 | |
distribution: 'adopt' | |
- name: mobsfscan | |
uses: MobSF/[email protected] | |
with: | |
args: '. --sarif --output results.sarif || true' | |
- name: Upload mobsfscan report | |
uses: github/codeql-action/upload-sarif@v2 | |
with: | |
sarif_file: results.sarif | |
- name: Build with Gradle | |
run: ./gradlew assembleRelease -PRELEASE_MAPS_MAPCACHE_API_KEY=${{ secrets.RELEASE_MAPS_MAPCACHE_API_KEY }} | |
- name: Sign APK | |
uses: Tlaster/[email protected] | |
with: | |
releaseDirectory: | | |
mapcache/build/outputs/apk/release | |
signingKeyBase64: ${{ secrets.SIGNING_KEY }} | |
output: build/release/signed | |
alias: ${{ secrets.ALIAS }} | |
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} | |
keyPassword: ${{ secrets.KEY_PASSWORD }} | |
- name: Copy Release Artifacts | |
run: | | |
mkdir mapcache/build/release | |
cp mapcache/build/outputs/apk/release/mapcache-*-signed.apk "mapcache/build/release/mapcache-$(./gradlew mapcache:androidAppVersion | grep versionName | sed 's/^.*@//').apk" | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v1 | |
with: | |
name: mapcache | |
path: mapcache/build/release |