Skip to content

Merge pull request #290 from yueeng/dependabot/gradle/androidx.test.e… #372

Merge pull request #290 from yueeng/dependabot/gradle/androidx.test.e…

Merge pull request #290 from yueeng/dependabot/gradle/androidx.test.e… #372

Workflow file for this run

name: Android CI
on:
push:
branches: [ master ]
paths-ignore:
- '.github/**'
- '.idea/**'
- 'README.md'
- 'LICENSE'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
concurrency:
group: build
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Cache Gradle
uses: actions/cache@v4.0.2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Time tick
run: echo "time_tick=$(date '+%Y%m%d%H%M')" >> $GITHUB_ENV
- name: Signing Apk
run: |
echo '${{ secrets.ANDROID_JKS }}'|base64 -d > android.jks
echo 'storeFile=../android.jks' >> local.properties
echo 'storePassword=${{ secrets.STORE_PASSWORD }}' >> local.properties
echo 'keyAlias=${{ secrets.KEY_ALIAS }}' >> local.properties
echo 'keyPassword=${{ secrets.KEY_PASSWORD }}' >> local.properties
echo 'buildTime=${{ env.time_tick }}' >> local.properties
- name: Update summary.json
run: ./gradlew summary
- name: Build with Gradle
run: ./gradlew publish
- name: Move Apk
run: |
cd ${{ github.workspace }}/app/build/outputs/apk
mv konachan/release/* konachan/
rm -fr konachan/release
mv yande/release/* yande/
rm -fr yande/release
- name: Artifact Apk
uses: actions/upload-artifact@v4
with:
name: outputs
path: ${{ github.workspace }}/app/build/outputs/**
- name: Zip Outputs
run: |
cd ${{ github.workspace }}/app/build/outputs
zip -r build.outputs.zip . -x "apk/*"
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ env.time_tick }}
name: pre-release ${{ env.time_tick }}
body: |
- ${{ github.event.head_commit.message }}
- ${{ github.sha }}
- ${{ github.ref }}
draft: false
prerelease: true
files: |
${{ github.workspace }}/app/build/outputs/apk/konachan/app-konachan-release.apk
${{ github.workspace }}/app/build/outputs/apk/yande/app-yande-release.apk
${{ github.workspace }}/app/build/outputs/build.outputs.zip