mockband/.gitea/publish.sh

15 lines
304 B
Bash
Executable File

#! /bin/sh
set -e
PACKAGE=${GITHUB_REPOSITORY#*/}
VERSION=$(date +%Y-%m-%dt%H.%M.%S)
for path in "$@"; do
fn=$(basename "$path")
curl \
--user "$GITHUB_ACTOR:$PACKAGE_API_TOKEN" \
--upload-file "$path" \
$GITHUB_SERVER_URL/api/packages/$GITHUB_ACTOR/generic/$PACKAGE/$VERSION/$fn
done