Update dependency com.squareup.okio:okio to v3.10.2 (#1631) #538
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: CI | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- v* | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build app | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone repo | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Set up JDK | |
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0 | |
with: | |
java-version: 17 | |
distribution: temurin | |
- name: Set up gradle | |
uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6 # v4.2.2 | |
- name: Check code format | |
run: ./gradlew spotlessCheck | |
- name: Build app | |
run: ./gradlew assembleStandardRelease | |
- name: Run unit tests | |
run: ./gradlew testReleaseUnitTest testStandardReleaseUnitTest | |
- name: Upload APK | |
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 | |
with: | |
name: arm64-v8a-${{ github.sha }} | |
path: app/build/outputs/apk/standard/release/app-standard-arm64-v8a-release-unsigned.apk | |
- name: Upload mapping | |
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0 | |
with: | |
name: mapping-${{ github.sha }} | |
path: app/build/outputs/mapping/standardRelease | |
# Sign APK and create release for tags | |
- name: Get tag name | |
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'mihonapp/mihon' | |
run: | | |
set -x | |
echo "VERSION_TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV | |
- name: Sign APK | |
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'mihonapp/mihon' | |
uses: r0adkll/sign-android-release@349ebdef58775b1e0d8099458af0816dc79b6407 # v1 | |
with: | |
releaseDirectory: app/build/outputs/apk/standard/release | |
signingKeyBase64: ${{ secrets.SIGNING_KEY }} | |
alias: ${{ secrets.ALIAS }} | |
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} | |
keyPassword: ${{ secrets.KEY_PASSWORD }} | |
- name: Clean up build artifacts | |
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'mihonapp/mihon' | |
run: | | |
set -e | |
mv app/build/outputs/apk/standard/release/app-standard-universal-release-unsigned-signed.apk mihon-${{ env.VERSION_TAG }}.apk | |
sha=`sha256sum mihon-${{ env.VERSION_TAG }}.apk | awk '{ print $1 }'` | |
echo "APK_UNIVERSAL_SHA=$sha" >> $GITHUB_ENV | |
mv app/build/outputs/apk/standard/release/app-standard-arm64-v8a-release-unsigned-signed.apk mihon-arm64-v8a-${{ env.VERSION_TAG }}.apk | |
sha=`sha256sum mihon-arm64-v8a-${{ env.VERSION_TAG }}.apk | awk '{ print $1 }'` | |
echo "APK_ARM64_V8A_SHA=$sha" >> $GITHUB_ENV | |
mv app/build/outputs/apk/standard/release/app-standard-armeabi-v7a-release-unsigned-signed.apk mihon-armeabi-v7a-${{ env.VERSION_TAG }}.apk | |
sha=`sha256sum mihon-armeabi-v7a-${{ env.VERSION_TAG }}.apk | awk '{ print $1 }'` | |
echo "APK_ARMEABI_V7A_SHA=$sha" >> $GITHUB_ENV | |
mv app/build/outputs/apk/standard/release/app-standard-x86-release-unsigned-signed.apk mihon-x86-${{ env.VERSION_TAG }}.apk | |
sha=`sha256sum mihon-x86-${{ env.VERSION_TAG }}.apk | awk '{ print $1 }'` | |
echo "APK_X86_SHA=$sha" >> $GITHUB_ENV | |
mv app/build/outputs/apk/standard/release/app-standard-x86_64-release-unsigned-signed.apk mihon-x86_64-${{ env.VERSION_TAG }}.apk | |
sha=`sha256sum mihon-x86_64-${{ env.VERSION_TAG }}.apk | awk '{ print $1 }'` | |
echo "APK_X86_64_SHA=$sha" >> $GITHUB_ENV | |
- name: Create Release | |
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'mihonapp/mihon' | |
uses: softprops/action-gh-release@01570a1f39cb168c169c802c3bceb9e93fb10974 # v2.1.0 | |
with: | |
tag_name: ${{ env.VERSION_TAG }} | |
name: Mihon ${{ env.VERSION_TAG }} | |
body: | | |
--- | |
### Checksums | |
| Variant | SHA-256 | | |
| ------- | ------- | | |
| Universal | ${{ env.APK_UNIVERSAL_SHA }} | |
| arm64-v8a | ${{ env.APK_ARM64_V8A_SHA }} | |
| armeabi-v7a | ${{ env.APK_ARMEABI_V7A_SHA }} | |
| x86 | ${{ env.APK_X86_SHA }} | | |
| x86_64 | ${{ env.APK_X86_64_SHA }} | | |
## If you are unsure which version to choose then go with mihon-${{ env.VERSION_TAG }}.apk | |
files: | | |
mihon-${{ env.VERSION_TAG }}.apk | |
mihon-arm64-v8a-${{ env.VERSION_TAG }}.apk | |
mihon-armeabi-v7a-${{ env.VERSION_TAG }}.apk | |
mihon-x86-${{ env.VERSION_TAG }}.apk | |
mihon-x86_64-${{ env.VERSION_TAG }}.apk | |
draft: true | |
prerelease: false | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |