Skip to content

switch to curl for discord upload #39

switch to curl for discord upload

switch to curl for discord upload #39

Workflow file for this run

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

View workflow run for this annotation

GitHub Actions / build

Invalid workflow file

The workflow is not valid. .github/workflows/build.yml (Line: 38, Col: 14): Unrecognized named-value: 'evn'. Located at position 1 within expression: evn.WEBHOOK
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 }}