try to publish artifacts
Mockband / build (push) Successful in 17s Details

This commit is contained in:
Neale Pickett 2024-01-04 21:29:44 -07:00
parent 1b884c7fe8
commit a4e89fa282
1 changed files with 12 additions and 3 deletions

View File

@ -3,15 +3,24 @@
set -e
PACKAGE=${GITHUB_REPOSITORY#*/}
VERSION=$GITHUB_REF_NAME.$(date +%Y-%m-%dt%H.%M.%S)
VERSION=$GITHUB_REF_NAME
BASE=$GITHUB_SERVER_URL/api/packages/$GITHUB_ACTOR/generic/$PACKAGE/$VERSION
echo "=== Delete existing version: $VERSION"
curl \
--include \
--user "$GITHUB_ACTOR:$PACKAGE_API_TOKEN" \
--request DELETE \
$BASE
for path in "$@"; do
fn=$(basename "$path")
echo "=== $fn"
echo "=== Upload $VERSION/$fn"
curl \
--fail \
--include \
--user "$GITHUB_ACTOR:$PACKAGE_API_TOKEN" \
--upload-file "$path" \
$GITHUB_SERVER_URL/api/packages/$GITHUB_ACTOR/generic/$PACKAGE/$VERSION/$fn
$BASE/$fn
done