diff --git a/.forgejo/workflows/build_release.yml b/.forgejo/workflows/build_release.yml index 28f002373..58c928b83 100755 --- a/.forgejo/workflows/build_release.yml +++ b/.forgejo/workflows/build_release.yml @@ -23,24 +23,33 @@ jobs: fetch-depth: 0 - name: Set up JDK - uses: actions/setup-java@v4 # Forgejo-compatible (node20) - with: - java-version: 17 - distribution: temurin + shell: bash + run: | + set -euo pipefail + if command -v java >/dev/null 2>&1; then + java -version + else + apt-get update + apt-get install -y openjdk-17-jdk + java -version + fi - name: Write google-services.json - uses: DamianReeves/write-file-action@6929a9a6d1807689191dcc8bbe62b54d70a32b42 # v1.3 - with: - path: app/google-services.json - contents: ${{ secrets.GOOGLE_SERVICES_JSON }} - write-mode: overwrite + shell: bash + run: | + set -euo pipefail + cat > app/google-services.json <<'EOF' + ${{ secrets.GOOGLE_SERVICES_JSON }} + EOF - name: Write client_secrets.json - uses: DamianReeves/write-file-action@6929a9a6d1807689191dcc8bbe62b54d70a32b42 # v1.3 - with: - path: app/src/main/assets/client_secrets.json - contents: ${{ secrets.GOOGLE_CLIENT_SECRETS_JSON }} - write-mode: overwrite + shell: bash + run: | + set -euo pipefail + mkdir -p app/src/main/assets + cat > app/src/main/assets/client_secrets.json <<'EOF' + ${{ secrets.GOOGLE_CLIENT_SECRETS_JSON }} + EOF - name: Prepare release metadata id: prepare @@ -67,7 +76,11 @@ jobs: } >> "$GITHUB_OUTPUT" - name: Set up Gradle - uses: gradle/actions/setup-gradle@v4.4.2 # Forgejo-compatible (node20) + shell: bash + run: | + set -euo pipefail + chmod +x ./gradlew + ./gradlew --version - name: Check code format run: ./gradlew spotlessCheck