Skip to content

Update gradle-publish.yml #10

Update gradle-publish.yml

Update gradle-publish.yml #10

name: Build APK and Notify Discord
on:
push:
branches:
- main
jobs:
build-and-notify:
runs-on: ubuntu-latest
steps:

Check failure on line 11 in .github/workflows/gradle-publish.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/gradle-publish.yml

Invalid workflow file

You have an error in your yaml syntax on line 11
- uses: actions/checkout@v3
- name: Setup JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
- name: Grant execute permissions to gradlew
run: chmod +x gradlew
- name: Build APK
run: ./gradlew assembleRelease
- 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: Send Discord notification
uses: Ilshidur/[email protected]
with:
webhook_url: ${{ secrets.DISCORD_WEBHOOK_URL }}
username: "Pre-Build Builder"
avatar_url: "https://media.discordapp.net/attachments/1066717089118814258/1183076684770054248/Xt6r8d0v.png?ex=65870506&is=65749006&hm=ce4090a900734cc623540a0a63a0f01844c9d54a0b33683fccb8587d408ca73b&"
content: |
**New APK build available!**
* **Commit ID:** ${{ steps.get_commit_info.outputs.COMMIT_ID }}
* **Commit message:** ${{ steps.get_commit_info.outputs.COMMIT_MESSAGE }}
* **Download:** https://github.com/${{ github.repository }}/releases/latest/download/app-release.apk