Skip to content

Commit

Permalink
Update and rename publish_alpha.yml to publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Shebyyy authored Nov 25, 2024
1 parent 8f62f47 commit 95d3536
Showing 1 changed file with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Build & Publish Alpha APK
on:
push:
branches:
- itsmechinmoy
- Workflow
paths-ignore:
- "docs/**"
- "README.md"
Expand Down Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Download last SHA artifact
uses: dawidd6/action-download-artifact@v3
with:
workflow: publish_alpha.yml
workflow: publish.yml
name: last-sha
path: .
continue-on-error: true
Expand Down Expand Up @@ -108,12 +108,16 @@ jobs:
env:
BUILD_TOOLS_VERSION: "34.0.0"

- name: Rename APK File
run: |
mv app/build/outputs/apk/alpha/release/app-alpha-release-signed.apk app/build/outputs/apk/alpha/release/Awery_Alpha.apk
- name: Upload Alpha APK
uses: actions/upload-artifact@v4
with:
name: "Alpha APK"
retention-days: 90
path: "app/build/outputs/apk/alpha/release/app-alpha-release-signed.apk"
path: "app/build/outputs/apk/alpha/release/Awery_Alpha.apk"

- name: Upload APK to Discord and Telegram
shell: bash
Expand Down Expand Up @@ -224,10 +228,10 @@ jobs:
max_length=1000
commit_messages=$(echo "$COMMIT_LOG" | sed 's/%0A/\n/g; s/^/\n/')
if [ ${#developers} -gt $max_length ]; then
developers="${developers:0:$max_length}... (truncated)"
developers="${developers:0:$max_length}"
fi
if [ ${#commit_messages} -gt $max_length ]; then
commit_messages="${commit_messages:0:$max_length}... (truncated)"
commit_messages="${commit_messages:0:$max_length}"
fi
discord_data=$(jq -nc \
Expand Down Expand Up @@ -276,7 +280,7 @@ jobs:
if [ "$SKIP_BUILD" != "true" ]; then
curl -F "payload_json=${contentbody}" \
-F "Awery_debug=@app/build/outputs/apk/alpha/release/app-alpha-release-signed.apk" \
-F "Awery_debug=@app/build/outputs/apk/alpha/release/Awery_Alpha.apk" \
${{ secrets.DISCORD_WEBHOOK_URL }}
else
echo "Skipping APK upload to Discord due to SKIP_BUILD being set to true"
Expand All @@ -301,8 +305,8 @@ jobs:
response=$(curl -sS -f -X POST \
"https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendDocument" \
-F "chat_id=-1002066701332" \
-F "message_thread_id=28" \
-F "document=@app/build/outputs/apk/alpha/release/app-alpha-release-signed.apk" \
-F "message_thread_id=737" \
-F "document=@app/build/outputs/apk/alpha/release/Awery_Alpha.apk" \
-F "caption=New Alpha-Build dropped 🔥
Commits:
${telegram_commit_messages}
Expand Down

0 comments on commit 95d3536

Please sign in to comment.