Merge branch 'main' into gradle-versions-check #133
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: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Setup Build ID | |
run: | | |
[[ "$MATRIX_OS" == ubuntu* ]] && osName=linux || osName="${MATRIX_OS:0:3}" | |
echo "BUILD_ID=$GITHUB_RUN_NUMBER.$osName" >> "$GITHUB_ENV" | |
shell: bash | |
env: | |
MATRIX_OS: ${{ matrix.os }} | |
- name: Setup signing KeyStore | |
if: github.event_name == 'push' && github.actor != 'dependabot[bot]' | |
run: | | |
base64 --decode <<< "$JAVA_KEYSTORE_DATA" > "$JAVA_KEYSTORE_FILE" | |
JAVA_KEYSTORE_FILE="${JAVA_KEYSTORE_FILE//\\/\\\\}" \ | |
envsubst < "$GITHUB_WORKSPACE/.github/workflows/keystore.properties" > "$KEYSTORE_PROPERTIES_FILE" | |
echo "KEYSTORE_PROPERTIES_FILE=$KEYSTORE_PROPERTIES_FILE" >> "$GITHUB_ENV" | |
shell: bash | |
env: | |
JAVA_KEYSTORE_ALIAS: ${{ secrets.JAVA_KEYSTORE_ALIAS }} | |
JAVA_KEYSTORE_DATA: ${{ secrets.JAVA_KEYSTORE_DATA }} | |
JAVA_KEYSTORE_FILE: ${{ runner.temp }}/keystore.jks | |
JAVA_KEYSTORE_PASSWORD: ${{ secrets.JAVA_KEYSTORE_PASSWORD }} | |
KEYSTORE_PROPERTIES_FILE: ${{ runner.temp }}/keystore.properties | |
- run: ./gradlew build signingReport | |
- name: Prep consolidated build outputs | |
run: | | |
mkdir -p "$RUNNER_TEMP/build-outputs" | |
mv 'app/build/outputs' "$RUNNER_TEMP/build-outputs/$MATRIX_OS" | |
shell: bash | |
env: | |
MATRIX_OS: ${{ matrix.os }} | |
- name: Upload build outputs | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build-outputs | |
path: ${{ runner.temp }}/build-outputs | |
if-no-files-found: error |