Update gradle and various support libraries #1198
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: Android CI | |
on: | |
push: | |
branches: [ launcher ] | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: gradle | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build with Gradle | |
run: ./gradlew assembleGithubRelease | |
- uses: r0adkll/sign-android-release@v1 | |
name: Sign app APK | |
# ID used to access action output | |
id: sign_app | |
with: | |
releaseDirectory: app/build/outputs/apk/github/release | |
signingKeyBase64: ${{ secrets.KEYSTORE }} | |
alias: ${{ secrets.KEY_ALIAS }} | |
keyStorePassword: ${{ secrets.STOREPASS }} | |
keyPassword: ${{ secrets.KEYPASS }} | |
env: | |
# override default build-tools version (29.0.3) -- optional | |
BUILD_TOOLS_VERSION: "34.0.0" | |
- name: Retrieve commit identification | |
run: | | |
GIT_BRANCH=$(git name-rev --name-only HEAD) | |
echo "GIT_BRANCH=${GIT_BRANCH}" >> $GITHUB_ENV | |
GIT_HASH=$(git rev-parse --short HEAD) | |
echo "GIT_HASH=${GIT_HASH}" >> $GITHUB_ENV | |
# Example use of `signedReleaseFile` output -- not needed | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: SamSprung-${{ env.GIT_HASH }} | |
path: ${{steps.sign_app.outputs.signedReleaseFile}} | |
- uses: SamSprung/[email protected] | |
if: ${{ github.event_name != 'pull_request' }} | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: "sideload" | |
prerelease: ${{ env.GIT_BRANCH != 'launcher' }} | |
title: SamSprung-${{ env.GIT_HASH }} | |
files: ${{steps.sign_app.outputs.signedReleaseFile}} |