ci: use npm ci, use upload_url from github api for releases [skip ci]
This commit is contained in:
@@ -86,7 +86,7 @@ jobs:
|
|||||||
uses: android-actions/setup-android@v3
|
uses: android-actions/setup-android@v3
|
||||||
|
|
||||||
- name: Install dependencies (root)
|
- name: Install dependencies (root)
|
||||||
run: npm install --prefer-offline
|
run: npm ci --prefer-offline
|
||||||
|
|
||||||
- name: Clean previous cinny dist
|
- name: Clean previous cinny dist
|
||||||
run: rm -rf cinny/dist
|
run: rm -rf cinny/dist
|
||||||
@@ -219,13 +219,16 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
FILENAME="Paarrot-${VERSION}.apk"
|
FILENAME="Paarrot-${VERSION}.apk"
|
||||||
|
UPLOAD_URL=$(curl -s -H "Authorization: token ${GH_TOKEN}" \
|
||||||
|
-H "Accept: application/vnd.github+json" \
|
||||||
|
"${API_BASE}/repos/${REPO}/releases/${RELEASE_ID}" | jq -r '.upload_url' | sed 's/{?name,label}//')
|
||||||
echo "Uploading ${FILENAME} to GitHub..."
|
echo "Uploading ${FILENAME} to GitHub..."
|
||||||
curl -s -X POST \
|
curl -s -X POST \
|
||||||
-H "Authorization: token ${GH_TOKEN}" \
|
-H "Authorization: token ${GH_TOKEN}" \
|
||||||
-H "Accept: application/vnd.github+json" \
|
-H "Accept: application/vnd.github+json" \
|
||||||
-H "Content-Type: application/octet-stream" \
|
-H "Content-Type: application/octet-stream" \
|
||||||
--data-binary "@${APK}" \
|
--data-binary "@${APK}" \
|
||||||
"https://uploads.github.com/repos/${REPO}/releases/${RELEASE_ID}/assets?name=${FILENAME}"
|
"${UPLOAD_URL}?name=${FILENAME}"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
echo "GitHub release complete!"
|
echo "GitHub release complete!"
|
||||||
|
|||||||
Reference in New Issue
Block a user