Clean up publish script
Mockband / build (push) Successful in 26s Details

This commit is contained in:
Neale Pickett 2024-01-08 13:13:42 -07:00
parent 13825855d3
commit 195c02748b
1 changed files with 3 additions and 5 deletions

View File

@ -7,23 +7,21 @@ VERSION=$GITHUB_REF_NAME
BASE=$GITHUB_SERVER_URL/api/packages/$GITHUB_ACTOR/generic/$PACKAGE/$VERSION
echo "=== Delete $VERSION"
curl \
--user "$GITHUB_ACTOR:$PACKAGE_API_TOKEN" \
--request DELETE \
$BASE
echo
for path in "$@"; do
fn=$(basename "$path")
echo "=== Upload $VERSION/$fn"
curl \
--user "$GITHUB_ACTOR:$PACKAGE_API_TOKEN" \
--request DELETE \
$BASE/$fn
curl \
--fail \
--user "$GITHUB_ACTOR:$PACKAGE_API_TOKEN" \
--upload-file "$path" \
$BASE/$fn
echo
done