mockband/.gitea/publish.sh

16 lines
308 B
Bash
Raw Normal View History

2024-01-04 20:19:31 -07:00
#! /bin/sh
2024-01-04 20:29:40 -07:00
set -e
2024-01-04 20:19:31 -07:00
PACKAGE=${GITHUB_REPOSITORY#*/}
VERSION=$(date +%Y-%m-%dt%H.%M.%S)
for path in "$@"; do
fn=$(basename "$path")
curl \
2024-01-04 20:31:38 -07:00
-v \
2024-01-04 20:19:31 -07:00
--user "$GITHUB_ACTOR:$GITHUB_TOKEN" \
--upload-file "$path" \
2024-01-04 20:21:13 -07:00
$GITHUB_SERVER_URL/api/packages/$GITHUB_ACTOR/generic/$PACKAGE/$VERSION/$fn
2024-01-04 20:19:31 -07:00
done