feat: provide way to build and attach platforms
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
# Create (or replace) a Gitea release and upload assets, using the Gitea API.
|
||||
#
|
||||
# Required env:
|
||||
# GITEA_API e.g. https://git.scient.ing/api/v1/repos/<owner>/<repo>
|
||||
# GITEA_API e.g., https://git.scient.ing/api/v1/repos/<owner>/<repo>
|
||||
# GITEA_TOKEN a token with contents:write
|
||||
# TAG the release tag
|
||||
# ASSETS space-separated list of files to attach
|
||||
@@ -14,7 +14,9 @@
|
||||
# TARGET_COMMITISH (default: empty; Gitea uses the default branch)
|
||||
# JQ jq command (default: jq); set to e.g. "pixi exec --spec jq -- jq"
|
||||
# DRY_RUN set to anything to print actions instead of calling the API
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
: "${GITEA_API:?}"; : "${GITEA_TOKEN:?}"; : "${TAG:?}"; : "${ASSETS:?}"
|
||||
: "${JQ:=jq}"
|
||||
name="${RELEASE_NAME:-$TAG}"
|
||||
@@ -24,6 +26,7 @@ replace="${REPLACE:-false}"
|
||||
target="${TARGET_COMMITISH:-}"
|
||||
auth="Authorization: token ${GITEA_TOKEN}"
|
||||
dry="${DRY_RUN:-}"
|
||||
|
||||
say() { echo "[gitea-release] $*"; }
|
||||
|
||||
if [ "$replace" = "true" ]; then
|
||||
@@ -66,4 +69,6 @@ for f in $ASSETS; do
|
||||
"${GITEA_API}/releases/${rid}/assets?name=${n}"
|
||||
fi
|
||||
done
|
||||
|
||||
say "done"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user