Added sorting to EMI and refactoring #43
Workflow file for this run
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: | |
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@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: temurin | |
cache: gradle | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build with Gradle | |
run: ./gradlew app:assembleRelease | |
- name: Get tag name | |
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'suyash01/credit-manager' | |
run: | | |
set -x | |
echo "VERSION_TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV | |
- name: Setup build tool version variable | |
shell: bash | |
run: | | |
BUILD_TOOL_VERSION=$(ls /usr/local/lib/android/sdk/build-tools/ | tail -n 1) | |
echo "BUILD_TOOL_VERSION=$BUILD_TOOL_VERSION" >> $GITHUB_ENV | |
echo Last build tool version is: $BUILD_TOOL_VERSION | |
- name: Sign APK | |
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'suyash01/credit-manager' | |
uses: r0adkll/sign-android-release@v1 | |
with: | |
releaseDirectory: app/build/outputs/apk/release/ | |
signingKeyBase64: ${{ secrets.BASE64_KEYSTORE }} | |
alias: ${{ secrets.ALIAS }} | |
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} | |
keyPassword: ${{ secrets.KEY_PASSWORD }} | |
env: | |
BUILD_TOOLS_VERSION: ${{ env.BUILD_TOOL_VERSION }} | |
- name: Clean up build artifacts | |
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'suyash01/credit-manager' | |
run: | | |
set -e | |
mv app/build/outputs/apk/release/app-release-unsigned-signed.apk credit-manager-${{ env.VERSION_TAG }}.apk | |
sha=`sha256sum credit-manager-${{ env.VERSION_TAG }}.apk | awk '{ print $1 }'` | |
echo "APK_UNIVERSAL_SHA=$sha" >> $GITHUB_ENV | |
- name: Create Release | |
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'suyash01/credit-manager' | |
uses: softprops/action-gh-release@v2 | |
with: | |
tag_name: ${{ env.VERSION_TAG }} | |
name: Credit Manager ${{ env.VERSION_TAG }} | |
body: | | |
--- | |
### Checksums | |
| Variant | SHA-256 | | |
| ------- | ------- | | |
| Universal | ${{ env.APK_UNIVERSAL_SHA }} | | |
files: | | |
credit-manager-${{ env.VERSION_TAG }}.apk | |
draft: true | |
prerelease: false | |
env: | |
GITHUB_TOKEN: ${{ secrets.PAT }} |