Update dependency androidx.recyclerview:recyclerview to v1.3.1 (#1495) #714
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 app | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
check_wrapper: | |
name: Validate Gradle Wrapper | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone repo | |
uses: actions/checkout@v3 | |
- name: Validate Gradle Wrapper | |
uses: gradle/[email protected] | |
build: | |
name: Build app | |
needs: check_wrapper | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set Swap Space | |
if: runner.os == 'Linux' | |
# v1.0 -> 49819abfb41bd9b44fb781159c033dba90353a7c | |
uses: pierotofy/set-swap-space@49819abfb41bd9b44fb781159c033dba90353a7c | |
with: | |
swap-size-gb: 7 | |
- name: Cancel previous runs | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- name: Clone repo | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: adopt | |
java-version: 17 | |
- name: Copy ci gradle.properties | |
run: | | |
mkdir -p ~/.gradle | |
cp .github/runner-files/ci-gradle.properties ~/.gradle/gradle.properties | |
- name: Write google-services.json | |
uses: DamianReeves/[email protected] | |
with: | |
path: app/google-services.json | |
contents: ${{ secrets.GOOGLE_SERVICE_JSON }} | |
write-mode: overwrite # optional, default is preserve | |
- name: Build app | |
uses: eskatos/gradle-command-action@v2 | |
with: | |
arguments: assembleStandardRelease | |
wrapper-cache-enabled: true | |
dependencies-cache-enabled: true | |
configuration-cache-enabled: true | |
- name: Sign APK | |
id: sign_app | |
uses: r0adkll/sign-android-release@v1 | |
with: | |
releaseDirectory: app/build/outputs/apk/standard/release | |
signingKeyBase64: ${{ secrets.SIGNING_KEY }} | |
alias: ${{ secrets.KEY_ALIAS }} | |
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} | |
keyPassword: ${{ secrets.KEY_PASSWORD }} | |
- name: Get previous release | |
id: last_release | |
uses: pozetroninc/github-action-get-latest-release@master | |
with: | |
repository: ${{ github.repository }} | |
excludes: prerelease, draft | |
- name: Prepare build | |
run: | | |
set -e | |
current_sha=$(git rev-parse --short HEAD) | |
echo "CURRENT_SHA=$current_sha" | |
echo "CURRENT_SHA=$current_sha" >> $GITHUB_ENV | |
prev_release_sha=$(git rev-list -n 1 ${{ steps.last_release.outputs.release }}) | |
echo "PREV_RELEASE_SHA=$prev_release_sha" | |
echo "PREV_RELEASE_SHA=$prev_release_sha" >> $GITHUB_ENV | |
echo "Url to compare: https://api.github.com/repos/carlosesco/neko/compare/$prev_release_sha...$current_sha" | |
echo "COMMIT_LOGS<<{delimiter} | |
$(curl -H "Accept: application/vnd.github.v3+json" \ | |
"https://api.github.com/repos/carlosesco/neko/compare/$prev_release_sha...$current_sha" \ | |
| jq '[.commits[]|{message:(.commit.message | split("\n")), username:.author.login}]' \ | |
| jq -r '.[]|"- \(.message | first) (@\(.username))"') | |
{delimiter}" >> $GITHUB_ENV | |
- name: Prep build artifacts for release | |
run: | | |
set -e | |
mv app/build/outputs/apk/standard/release/Neko-standard-universal-release-unsigned-signed.apk neko-universal.apk | |
sha=`sha256sum neko-universal.apk | awk '{ print $1 }'` | |
echo "APK_UNIVERSAL_SHA=$sha" >> $GITHUB_ENV | |
echo "| Universal | $sha" >> CurrentChangeLog.MD | |
cp app/build/outputs/apk/standard/release/Neko-standard-arm64-v8a-release-unsigned-signed.apk neko-arm64-v8a.apk | |
sha=`sha256sum neko-arm64-v8a.apk | awk '{ print $1 }'` | |
echo "APK_ARM64_V8A_SHA=$sha" >> $GITHUB_ENV | |
cp app/build/outputs/apk/standard/release/Neko-standard-armeabi-v7a-release-unsigned-signed.apk neko-armeabi-v7a.apk | |
sha=`sha256sum neko-armeabi-v7a.apk | awk '{ print $1 }'` | |
echo "APK_ARMEABI_V7A_SHA=$sha" >> $GITHUB_ENV | |
cp app/build/outputs/apk/standard/release/Neko-standard-x86-release-unsigned-signed.apk neko-x86.apk | |
sha=`sha256sum neko-x86.apk | awk '{ print $1 }'` | |
echo "APK_X86_SHA=$sha" >> $GITHUB_ENV | |
cp app/build/outputs/apk/standard/release/Neko-standard-x86_64-release-unsigned-signed.apk neko-x86_64.apk | |
sha=`sha256sum neko-x86_64.apk | awk '{ print $1 }'` | |
echo "APK_X86_64_SHA=$sha" >> $GITHUB_ENV | |
- name: Delete any draft releases and last latest tag | |
uses: dev-drprasad/[email protected] | |
with: | |
delete_release: true | |
tag_name: latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create Release | |
uses: ncipollo/[email protected] | |
with: | |
allowUpdates: true | |
body: | | |
## 🥳 New | |
## 🏗️ Changes | |
## 🐜 Fixes | |
## 🛠️ Other | |
${{ env.COMMIT_LOGS }} | |
| 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 }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
draft: true | |
replacesArtifacts: true | |
tag: "latest" | |
artifacts: "*.apk" | |