From 8ca1c3be1fa36179c5e13d2ef6f5c2c41344d5c7 Mon Sep 17 00:00:00 2001 From: rebelonion <87634197+rebelonion@users.noreply.github.com> Date: Sun, 4 Feb 2024 04:14:19 -0600 Subject: [PATCH] show more commit messages in discord message --- .github/workflows/beta.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/beta.yml b/.github/workflows/beta.yml index 2b5676c6..2abc497e 100644 --- a/.github/workflows/beta.yml +++ b/.github/workflows/beta.yml @@ -17,6 +17,13 @@ jobs: - name: Checkout repo uses: actions/checkout@v3 + - name: Get Last 10 Commits + id: get_commits + run: | + echo 'COMMIT_LOG<> $GITHUB_ENV + git log ${{ github.event.before }}..${{ github.sha }} --pretty=format:"%s" -10 >> $GITHUB_ENV + echo 'EOF' >> $GITHUB_ENV + - name: Set variables run: | VER=$(grep -E -o "versionName \".*\"" app/build.gradle | sed -e 's/versionName //g' | tr -d '"') @@ -53,8 +60,9 @@ jobs: - name: Upload APK to Discord shell: bash run: | - contentbody=$( jq -Rsa . <<< "${{ github.event.head_commit.message }}" ) - curl -F "payload_json={\"content\":\" Alpha-Build: <@659107544597266465> **${{ env.VERSION }}**\n\n${contentbody:1:-1}\"}" -F "dantotsu_debug=@app/build/outputs/apk/alpha/app-alpha.apk" ${{ secrets.DISCORD_WEBHOOK }} + commit_messages=$(echo "$COMMIT_LOG") + contentbody=$( jq -Rsa . <<< "Alpha-Build: <@659107544597266465> **${{ env.VERSION }}**\n\n$commit_messages" ) + curl -F "payload_json={\"content\":${contentbody}}" -F "dantotsu_debug=@app/build/outputs/apk/alpha/app-alpha.apk" ${{ secrets.DISCORD_WEBHOOK }} - name: Delete Old Pre-Releases id: delete-pre-releases