Try preserving package versions
Mockband / build (push) Successful in 21s Details

This commit is contained in:
Neale Pickett 2024-01-04 23:12:51 -07:00
parent 5fa607d6b0
commit 7495bfd20f
1 changed files with 5 additions and 8 deletions

View File

@ -7,19 +7,16 @@ VERSION=$GITHUB_REF_NAME
BASE=$GITHUB_SERVER_URL/api/packages/$GITHUB_ACTOR/generic/$PACKAGE/$VERSION 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 for path in "$@"; do
fn=$(basename "$path") fn=$(basename "$path")
echo "=== Upload $VERSION/$fn" echo "=== Upload $VERSION/$fn"
curl \
--user "$GITHUB_ACTOR:$PACKAGE_API_TOKEN" \
--request DELETE \
$BASE/$fn
curl \ curl \
--fail \ --fail \
--include \
--user "$GITHUB_ACTOR:$PACKAGE_API_TOKEN" \ --user "$GITHUB_ACTOR:$PACKAGE_API_TOKEN" \
--upload-file "$path" \ --upload-file "$path" \
$BASE/$fn $BASE/$fn