mirror of
https://github.com/rebelonion/Dantotsu.git
synced 2026-01-28 07:01:01 +00:00
test: place before %0A
This commit is contained in:
17
.github/workflows/beta.yml
vendored
17
.github/workflows/beta.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI: true
|
||||
SKIP_APK: false
|
||||
SKIP_BUILDING_APK: true
|
||||
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
@@ -81,11 +81,11 @@ jobs:
|
||||
run: chmod +x ./gradlew
|
||||
|
||||
- name: Build with Gradle
|
||||
if: ${{ env.SKIP_APK != 'true' }}
|
||||
if: ${{ env.SKIP_BUILDING_APK != 'true' }}
|
||||
run: ./gradlew assembleGoogleAlpha
|
||||
|
||||
- name: Upload a Build Artifact
|
||||
if: ${{ env.SKIP_APK != 'true' }}
|
||||
if: ${{ env.SKIP_BUILDING_APK != 'true' }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Dantotsu
|
||||
@@ -189,7 +189,8 @@ jobs:
|
||||
else
|
||||
thumbnail_url="https://i.imgur.com/5o3Y9Jb.gif"
|
||||
fi
|
||||
|
||||
|
||||
commit_messages=$(echo "$COMMIT_LOG" | sed -E 's/ \[֍\]\(https?:\/\/[^)]+\)//g'
|
||||
commit_messages=$(echo "$COMMIT_LOG" | sed 's/%0A/\n/g; s/^/\n/')
|
||||
|
||||
# Truncate field values
|
||||
@@ -244,23 +245,23 @@ jobs:
|
||||
${{ secrets.DISCORD_WEBHOOK }}
|
||||
|
||||
# Upload APK to Discord
|
||||
if [ "$SKIP_APK" != "true" ]; then
|
||||
if [ "$SKIP_BUILDING_APK" != "true" ]; then
|
||||
curl -F "payload_json=${contentbody}" \
|
||||
-F "dantotsu_debug=@app/build/outputs/apk/google/alpha/app-google-alpha.apk" \
|
||||
${{ secrets.DISCORD_WEBHOOK }}
|
||||
else
|
||||
echo "Skipping APK upload to Discord due to SKIP_APK being set to true"
|
||||
echo "Skipping APK upload to Discord due to SKIP_BUILDING_APK being set to true"
|
||||
fi
|
||||
|
||||
# Send Telegram message with APK upload
|
||||
if [ "$SKIP_APK" != "true" ]; then
|
||||
if [ "$SKIP_BUILDING_APK" != "true" ]; then
|
||||
commit_messages=$(echo "$COMMIT_LOG" | sed -E 's/ \[֍\]\(https?:\/\/[^)]+\)//g')
|
||||
curl -F "chat_id=${{ secrets.TELEGRAM_CHANNEL_ID }}" \
|
||||
-F "document=@app/build/outputs/apk/google/alpha/app-google-alpha.apk" \
|
||||
-F "caption=Alpha-Build: ${VERSION}: ${commit_messages}" \
|
||||
https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendDocument
|
||||
else
|
||||
echo "Skipping Telegram message and APK upload due to SKIP_APK being set to true"
|
||||
echo "Skipping Telegram message and APK upload due to SKIP_BUILDING_APK being set to true"
|
||||
fi
|
||||
|
||||
env:
|
||||
|
||||
Reference in New Issue
Block a user