Skip to content

Update build tools for Actions deprecation #1184

Update build tools for Actions deprecation

Update build tools for Actions deprecation #1184

Workflow file for this run

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/action-github-releases@v1.0.0
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}}