Prepare Gestalt fork #2
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: Breezy Weather push CI | |
on: | |
push: | |
branches: | |
- gestalt | |
tags: | |
- v* | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Gradle Wrapper | |
uses: gradle/actions/wrapper-validation@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1 | |
- name: Setup Android SDK | |
run: | | |
${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager "build-tools;29.0.3" | |
- name: Set up JDK | |
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0 | |
with: | |
java-version: 17 | |
distribution: adopt | |
- name: Set up gradle | |
uses: gradle/actions/setup-gradle@cc4fc85e6b35bafd578d5ffbc76a5518407e1af0 # v4.2.1 | |
- name: Lint + Assemble gestalt flavor | |
run: ./gradlew spotlessCheck assembleGestaltRelease | |
- name: Save version tag in env | |
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'BimmerGestalt/breezy-weather' | |
run: | | |
set -x | |
echo "VERSION_TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV | |
- name: Sign APK (gestalt) | |
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'BimmerGestalt/breezy-weather' | |
uses: r0adkll/sign-android-release@349ebdef58775b1e0d8099458af0816dc79b6407 # v1 | |
with: | |
releaseDirectory: app/build/outputs/apk/gestalt/release | |
signingKeyBase64: ${{ secrets.SIGNING_KEY }} | |
alias: ${{ secrets.ALIAS }} | |
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} | |
keyPassword: ${{ secrets.KEY_PASSWORD }} | |
- name: Prepare APKs with checksums, archive mapping.txt file | |
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'BimmerGestalt/breezy-weather' | |
run: | | |
set -e | |
mv app/build/outputs/apk/gestalt/release/app-gestalt-universal-release-unsigned-signed.apk breezy-weather-${{ env.VERSION_TAG }}_gestalt.apk | |
sha256=`sha256sum breezy-weather-${{ env.VERSION_TAG }}_gestalt.apk | awk '{ print $1 }'` | |
echo "APK_GESTALT_SHA256=$sha256" >> $GITHUB_ENV | |
tar -czvf mapping-${{ env.VERSION_TAG }}_gestalt.tar.gz --directory=app/build/outputs/mapping/gestaltRelease/ mapping.txt | |
- name: Create release | |
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'BimmerGestalt/breezy-weather' | |
uses: softprops/action-gh-release@01570a1f39cb168c169c802c3bceb9e93fb10974 # v2.1.0 | |
with: | |
tag_name: ${{ env.VERSION_TAG }} | |
name: Breezy Weather ${{ env.VERSION_TAG }} | |
body: | | |
**Don’t know which release to choose? Just pick `breezy-weather-${{ env.VERSION_TAG }}_standard.apk`, or check [INSTALL instructions](https://github.com/breezy-weather/breezy-weather/blob/main/INSTALL.md) for more details.** | |
--- | |
### Checksums | |
| Flavor | Variant | SHA-256 | | |
|---------------|-------------|----------------------------------------| | |
| Gestalt | Universal | ${{ env.APK_GESTALT_SHA256 }} | | |
files: | | |
breezy-weather-${{ env.VERSION_TAG }}_gestalt.apk | |
mapping-${{ env.VERSION_TAG }}_gestalt.tar.gz | |
draft: true | |
prerelease: false |