set up version 1.2.4 #27
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 Artifacts | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: 17 | |
- name: Build with Gradle | |
run: ./gradlew gars:build -x lint | |
- name: Copy Release Artifacts | |
run: | | |
mkdir gars/build/release | |
cp gars/build/libs/*.jar gars/build/outputs/aar/*release.aar gars/build/release/ | |
grep "version =" gars/build.gradle | sed 's/[a-z ="]//g' > VERSION | |
mv gars/build/release/*.aar gars/build/release/gars-android-$(cat VERSION).aar | |
- name: Build App with Gradle | |
run: ./gradlew app:assembleRelease -PRELEASE_MAPS_GARS_API_KEY=${{ secrets.RELEASE_MAPS_GARS_API_KEY }} | |
- name: Setup build tool version variable | |
shell: bash | |
run: | | |
BUILD_TOOL_VERSION=$(ls /usr/local/lib/android/sdk/build-tools/ | tail -n 1) | |
echo "BUILD_TOOL_VERSION=$BUILD_TOOL_VERSION" >> $GITHUB_ENV | |
echo Last build tool version is: $BUILD_TOOL_VERSION | |
- name: Sign APK | |
uses: r0adkll/sign-android-release@v1 | |
with: | |
releaseDirectory: app/build/outputs/apk/release | |
signingKeyBase64: ${{ secrets.SIGNING_KEY }} | |
alias: ${{ secrets.ALIAS }} | |
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} | |
keyPassword: ${{ secrets.KEY_PASSWORD }} | |
env: | |
BUILD_TOOLS_VERSION: ${{ env.BUILD_TOOL_VERSION }} | |
- name: Copy Release Artifacts | |
run: | | |
grep "version =" gars/build.gradle | sed 's/[a-z ="]//g' > VERSION | |
cp app/build/outputs/apk/release/app-*-signed.apk "gars/build/release/gars-$(cat VERSION).apk" | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v1 | |
with: | |
name: gars-android | |
path: gars/build/release |