switch to curl for discord upload #39
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | ||
on: [ push, pull_request, workflow_dispatch ] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
- name: Setup JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'zulu' | ||
java-version: 17 | ||
cache: 'gradle' | ||
- name: Make gradlew executable | ||
run: chmod +x ./gradlew | ||
- name: Build with Gradle | ||
run: ./gradlew assembleDebug | ||
- name: Upload APK | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
path: app/build/outputs/apk/debug/app-debug.apk | ||
- name: Upload APK to Discord | ||
shell: bash | ||
env: | ||
VERSION: ${{ github.event.head_commit.id }} | ||
CONTENT: ${{ github.event.head_commit.message }} | ||
ROLE: ${{ secrets.DISCORD_PING_ROLE_ID }} | ||
WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | ||
run: | | ||
Check failure on line 38 in .github/workflows/build.yml GitHub Actions / buildInvalid workflow file
|
||
contentbody=$( jq -Rsa . <<< "${{ env.CONTENT }}" ) | ||
curl -F "payload_json={\"content\":\"<@&${{ env.ROLE }}> **${{ env.VERSION }}**\n\n${contentbody:1:-1}\"}" -F "echo_beta=@app/build/outputs/apk/debug/app-debug.apk" ${{ evn.WEBHOOK }} |