Public Access
Update release workflow: quotes and asset uploads
Release Pipeline / build-and-release (push) Successful in 5m14s
Release Pipeline / build-and-release (push) Successful in 5m14s
This commit is contained in:
1 parent
13bebba16e
commit
e21610880b
1 file changed
+7
-7
@@ -3,7 +3,7 @@ name: Release Pipeline
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
- "v*"
|
||||
|
||||
jobs:
|
||||
build-and-release:
|
||||
@@ -17,7 +17,7 @@ jobs:
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
node-version: "20"
|
||||
|
||||
- name: Install Frontend Dependencies
|
||||
working-directory: ./frontend
|
||||
@@ -114,11 +114,11 @@ jobs:
|
||||
echo "Uploading assets to release ID: ${RELEASE_ID}"
|
||||
for FILE in brainwave-amd64.tar.gz brainwave-arm64.tar.gz docker-compose.amd64.yml docker-compose.arm64.yml; do
|
||||
echo "Uploading ${FILE}..."
|
||||
curl -s -X POST \
|
||||
UPLOAD_RESPONSE=$(curl -s -X POST \
|
||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||
-H "Content-Type: application/octet-stream" \
|
||||
--data-binary "@${FILE}" \
|
||||
"${SERVER_URL}/api/v1/repos/${REPOSITORY}/releases/${RELEASE_ID}/assets?name=${FILE}" \
|
||||
| grep -q "id" || { echo "Failed to upload ${FILE}"; exit 1; }
|
||||
-F "attachment=@${FILE}" \
|
||||
"${SERVER_URL}/api/v1/repos/${REPOSITORY}/releases/${RELEASE_ID}/assets?name=${FILE}")
|
||||
echo "${UPLOAD_RESPONSE}" | python3 -c "import sys, json; data=json.load(sys.stdin); exit(0 if 'id' in data else 1)" \
|
||||
|| { echo "Failed to upload ${FILE}"; echo "Response: ${UPLOAD_RESPONSE}"; exit 1; }
|
||||
done
|
||||
echo "Release completed successfully!"
|
||||
Reference in new issue
Block a user