forked from breezy-weather/breezy-weather
-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (67 loc) · 3.33 KB
/
push.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
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