try to publish artifacts
Mockband / build (push) Successful in 17s
Details
Mockband / build (push) Successful in 17s
Details
This commit is contained in:
parent
1b884c7fe8
commit
a4e89fa282
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue