Fix effect of min/max values of sensors #75
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: Release Juicy Noise Android application | |
on: | |
push: | |
tags: | |
- '*' | |
branches: | |
- 'main' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Format ref | |
id: format-ref | |
shell: bash | |
run: | | |
sha_short="$(echo "${{ github.sha }}" | head -c 8)" | |
ref="${sha_short}" | |
if ${{ startsWith(github.ref, 'refs/tags/') }}; then | |
ref="${{ github.ref_name }}" | |
fi | |
echo "::set-output name=value::${ref}" | |
- name: Restore Gradle cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Build Android client | |
run: | | |
pushd "juicy-noise-android" | |
./gradlew assembleDebug | |
popd | |
mv \ | |
"juicy-noise-android/app/build/outputs/apk/debug/app-debug.apk" \ | |
"juicy-noise-${{ steps.format-ref.outputs.value }}.apk" | |
- name: Upload artifacts for Android | |
uses: actions/upload-artifact@v3 | |
with: | |
name: apk | |
path: '*.apk' | |
if-no-files-found: error | |
retention-days: 2 | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
token: '${{ secrets._GITHUB_PAT }}' | |
files: '*.apk' |