diff --git a/.forgejo/workflows/build_release.yml b/.forgejo/workflows/build_release.yml index 061238bf1..bcdf1398d 100755 --- a/.forgejo/workflows/build_release.yml +++ b/.forgejo/workflows/build_release.yml @@ -120,11 +120,11 @@ jobs: commit_logs='- Initial release' fi - { - echo 'COMMIT_LOGS<> "$GITHUB_OUTPUT" + # Do not pass multiline commit text via step outputs / env (breaks some Forgejo/act_runner + # runners before the shell starts — empty logs). Only pass a temp file path. + commit_log_file="$(mktemp /tmp/komikku-commit-logs.XXXXXX)" + printf '%s\n' "$commit_logs" > "${commit_log_file}" + echo "COMMIT_LOG_FILE=${commit_log_file}" >> "${GITHUB_ENV}" - name: Set up Gradle shell: bash @@ -304,12 +304,12 @@ jobs: UPSTREAM_REPO: ${{ steps.prepare.outputs.UPSTREAM_REPO }} UPSTREAM_REF: ${{ steps.prepare.outputs.UPSTREAM_REF }} UPSTREAM_BASE: ${{ steps.prepare.outputs.UPSTREAM_BASE }} - COMMIT_LOGS: ${{ steps.prepare.outputs.COMMIT_LOGS }} REPO_URL: ${{ github.server_url }}/${{ github.repository }} REPOSITORY_NAME: ${{ github.repository }} FORGEJO_CURL_INSECURE: "true" run: | set -euo pipefail + echo "Create or update release: shell running; COMMIT_LOG_FILE=${COMMIT_LOG_FILE:-}" export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${PATH:-}" @@ -389,7 +389,10 @@ jobs: payload_file="$(mktemp)" response_file="$(mktemp)" - commit_logs="${COMMIT_LOGS:-}" + commit_logs="" + if [ -n "${COMMIT_LOG_FILE:-}" ] && [ -f "${COMMIT_LOG_FILE}" ]; then + commit_logs="$(cat "${COMMIT_LOG_FILE}")" + fi commit_logs="$(printf '%s' "$commit_logs" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')" if [ -z "$commit_logs" ]; then commit_logs="- Initial release"