Fix release API call
This commit is contained in:
@@ -36,18 +36,17 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
TAG_NAME=${GITHUB_REF#refs/tags/}
|
TAG_NAME=${GITHUB_REF#refs/tags/}
|
||||||
APK_FILE=$(ls app/build/outputs/apk/release/*.apk | head -1)
|
APK_FILE=$(ls app/build/outputs/apk/release/*.apk | head -1)
|
||||||
curl -X POST "${{ env.GITEA_INSTANCE_URL }}/api/v1/repos/${{ github.repository }}/releases" \
|
|
||||||
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
|
# Create release via API
|
||||||
|
curl -X POST "https://git-dangilcal.duckdns.org/api/v1/repos/dangilcal/Helldivers-app-movil/releases" \
|
||||||
|
-H "accept: application/json" \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d "{
|
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
|
||||||
\"tag_name\": \"$TAG_NAME\",
|
-d "{\"tag_name\": \"$TAG_NAME\", \"name\": \"Release $TAG_NAME\", \"draft\": false, \"prerelease\": false}"
|
||||||
\"name\": \"Release $TAG_NAME\",
|
|
||||||
\"draft\": false,
|
# Upload asset
|
||||||
\"prerelease\": false,
|
curl -X POST "https://git-dangilcal.duckdns.org/api/v1/repos/dangilcal/Helldivers-app-movil/releases/tags/$TAG_NAME/assets" \
|
||||||
\"assets\": [
|
-H "accept: application/json" \
|
||||||
{
|
-H "Content-Type: multipart/form-data" \
|
||||||
\"name\": \"$(basename $APK_FILE)\",
|
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
|
||||||
\"url\": \"${{ env.GITEA_INSTANCE_URL }}/${{ github.repository }}/releases/download/$TAG_NAME/$(basename $APK_FILE)\"
|
-F "attachment=@$APK_FILE"
|
||||||
}
|
|
||||||
]
|
|
||||||
}"
|
|
||||||
|
|||||||
Reference in New Issue
Block a user