Skip to content
This repository has been archived by the owner on Jan 21, 2024. It is now read-only.

Update stable.md

Update stable.md #1

Workflow file for this run

name: Android CI Release
on:
workflow_dispatch:
push:
paths:
- 'stable.md'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set variables
run: |
VER=$(cat stable.md | head -n1 | sed -e "s/# //")
echo "VERSION=$VER" >> $GITHUB_ENV
- name: set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Cook KeyStore
run: echo "${{ secrets.KEYSTORE_B64 }}" | base64 -d > $GITHUB_WORKSPACE/signing-key.jks
- name: Enable Reports
run: sed "s/DisabledReports=true/DisabledReports=false/g" -i app/src/main/java/ani/saikou/others/DisabledReports.kt
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew assembleRelease
-Pandroid.injected.signing.store.file=$GITHUB_WORKSPACE/signing-key.jks
-Pandroid.injected.signing.store.password=${{ secrets.PASSWORD }}
-Pandroid.injected.signing.key.alias=key0
-Pandroid.injected.signing.key.password=${{ secrets.PASSWORD }}
shell: bash
- name: Upload a Build Artifact
uses: actions/upload-artifact@v3.0.0
with:
path: "app/build/outputs/apk/debug/app-debug.apk"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ env.VERSION }}
release_name: Saikou ${{ env.VERSION }}
body_path: "stable.md"
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: "app/build/outputs/apk/release/app-release.apk"
asset_name: Saikou-${{ env.VERSION }}.apk
asset_content_type: application/vnd.android.package-archive