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