Files
ugly-queue/scripts/build.sh
Aaron Guise d9d01fcbb3
Some checks failed
CI / release (push) Successful in 1m47s
Create Distribution / Create Archive (push) Failing after 2s
fix: Fixing CI. Separate flow for upload 👷🔥
2024-10-29 21:10:53 +13:00

33 lines
1.0 KiB
Bash
Executable File

#!/bin/bash
mkdir -p ./build/
echo "Made temporary directory"
# Package up the release (Needs to be .zip for upload to gitea)
zip -r "./build/Package.zip" \
. \
-x '.semrel/*' \
-x '.generated-go-semantic-release-changelog.md' \
-x './vendor/*' \
-x './tests/*' \
-x './build/*' \
-x './.git/*' \
-x './.idea/*' \
-x './.github/*' \
-x './scripts/*'
#RELEASE_ID=$(curl --silent -X 'GET' "${GITEA_HOST}/api/v1/repos/cybercinch/ugly-queue/releases/latest" \
#-H "accept: application/json" \
#-H "Authorization: token ${GITEA_TOKEN}" | jq -r .id)
#
## Attach to release
#curl --silent -X 'POST' "${GITEA_HOST}/api/v1/repos/cybercinch/ugly-queue/releases/${RELEASE_ID}/assets?name=ugly-queue-${1}.tar.gz" \
#-H "Authorization: token ${GITEA_TOKEN}" \
#--form attachment="@build/ugly-queue-${1}.tar.gz"
# Upload the artifact to composer registry
curl --user "cibot:${GITEA_TOKEN}" \
--upload-file "build/ugly-queue.zip" \
"${GITEA_HOST}/api/packages/cybercinch/composer?version=${1}"