Skip to content

Commit

Permalink
show more commit messages in discord message
Browse files Browse the repository at this point in the history
  • Loading branch information
rebelonion committed Feb 4, 2024
1 parent ed19aac commit 8ca1c3b
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v3

- name: Get Last 10 Commits
id: get_commits
run: |
echo 'COMMIT_LOG<<EOF' >> $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 '"')
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8ca1c3b

Please sign in to comment.