Skip to content

Update gradle-publish.yml #14

Update gradle-publish.yml

Update gradle-publish.yml #14

name: Build APK and Notify Discord
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Build with Gradle
run: ./gradlew assembleDebug
- name: Get latest commit message and ID
id: get_commit_info
run: |
echo "COMMIT_MESSAGE=$(git log -1 --pretty=%B)" >> $GITHUB_ENV
echo "COMMIT_ID=${GITHUB_SHA}" >> $GITHUB_ENV
- name: Upload a Build Artifact
uses: actions/[email protected]
with:
name: Dantotsu
path: "app/build/outputs/apk/debug/app-debug.apk"
- name: Send Discord notification
uses: Ilshidur/[email protected]
with:
webhook_url: ${{ secrets.DISCORD_WEBHOOK }}
args: |
New build available!
file: "app/build/outputs/apk/debug/app-debug.apk"