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
|
set -e
|
||||||
|
|
||||||
PACKAGE=${GITHUB_REPOSITORY#*/}
|
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
|
for path in "$@"; do
|
||||||
fn=$(basename "$path")
|
fn=$(basename "$path")
|
||||||
echo "=== $fn"
|
echo "=== Upload $VERSION/$fn"
|
||||||
curl \
|
curl \
|
||||||
--fail \
|
--fail \
|
||||||
--include \
|
--include \
|
||||||
--user "$GITHUB_ACTOR:$PACKAGE_API_TOKEN" \
|
--user "$GITHUB_ACTOR:$PACKAGE_API_TOKEN" \
|
||||||
--upload-file "$path" \
|
--upload-file "$path" \
|
||||||
$GITHUB_SERVER_URL/api/packages/$GITHUB_ACTOR/generic/$PACKAGE/$VERSION/$fn
|
$BASE/$fn
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue