Use heredoc for embedded Python (fix IndentationError)
Release / Build & publish plugin zip (push) Failing after 7s
Release / Build & publish plugin zip (push) Failing after 7s
This commit is contained in:
@@ -95,22 +95,22 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
payload=$(TAG="$TAG" python3 -c '
|
payload=$(TAG="$TAG" GH_SHA="$GITHUB_SHA" python3 - <<'PYEOF'
|
||||||
import json, os
|
import json, os
|
||||||
tag = os.environ["TAG"]
|
|
||||||
print(json.dumps({
|
print(json.dumps({
|
||||||
"tag_name": tag,
|
"tag_name": os.environ["TAG"],
|
||||||
"name": tag,
|
"name": os.environ["TAG"],
|
||||||
"body": (
|
"body": (
|
||||||
"Automated release.\n\n"
|
"Automated release.\n\n"
|
||||||
"Built from commit " + os.environ.get("GITHUB_SHA", "unknown") + ".\n\n"
|
"Built from commit " + os.environ.get("GH_SHA", "unknown") + ".\n\n"
|
||||||
"See the workflow run for the artifact."
|
"See the workflow run for the artifact."
|
||||||
),
|
),
|
||||||
"draft": False,
|
"draft": False,
|
||||||
"prerelease": False,
|
"prerelease": False,
|
||||||
"generate_release_notes": True,
|
"generate_release_notes": True,
|
||||||
}))
|
}))
|
||||||
')
|
PYEOF
|
||||||
|
)
|
||||||
|
|
||||||
release_json=$(curl -fsS -X POST \
|
release_json=$(curl -fsS -X POST \
|
||||||
-H "Authorization: token ${GITHUB_TOKEN}" \
|
-H "Authorization: token ${GITHUB_TOKEN}" \
|
||||||
@@ -144,21 +144,21 @@ jobs:
|
|||||||
API="${GH_API_URL%/}/api/v1"
|
API="${GH_API_URL%/}/api/v1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
payload=$(TAG="$TAG" python3 -c '
|
payload=$(TAG="$TAG" GH_SHA="$GITHUB_SHA" python3 - <<'PYEOF'
|
||||||
import json, os
|
import json, os
|
||||||
tag = os.environ["TAG"]
|
|
||||||
print(json.dumps({
|
print(json.dumps({
|
||||||
"tag_name": tag,
|
"tag_name": os.environ["TAG"],
|
||||||
"name": tag,
|
"name": os.environ["TAG"],
|
||||||
"body": (
|
"body": (
|
||||||
"Automated release.\n\n"
|
"Automated release.\n\n"
|
||||||
"Built from commit " + os.environ.get("GITHUB_SHA", "unknown") + ".\n\n"
|
"Built from commit " + os.environ.get("GH_SHA", "unknown") + ".\n\n"
|
||||||
"See the workflow run for the artifact."
|
"See the workflow run for the artifact."
|
||||||
),
|
),
|
||||||
"draft": False,
|
"draft": False,
|
||||||
"prerelease": False,
|
"prerelease": False,
|
||||||
}))
|
}))
|
||||||
')
|
PYEOF
|
||||||
|
)
|
||||||
|
|
||||||
release_json=$(curl -fsS -X POST \
|
release_json=$(curl -fsS -X POST \
|
||||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||||
|
|||||||
Reference in New Issue
Block a user