Skip to content

Commit

Permalink
Update android.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
akshaynikhare authored Jun 4, 2024
1 parent fc23dbd commit 6ade2eb
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,16 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
assets_url=${{ steps.create_release.outputs.upload_url }}
release_id=$(curl -s \
-H "Authorization: Bearer $GITHUB_TOKEN" \
https://api.github.com/repos/${{ github.repository }}/releases/tags/v${{ env.version }} \
| jq -r '.id')
upload_url="https://uploads.github.com/repos/${{ github.repository }}/releases/$release_id/assets?name=app-v${{ env.version }}.apk"
asset_path=./app/build/outputs/apk/release/app-release.apk
asset_name=app-v${{ env.version }}.apk
# Strip the URL to the base for the upload
base_url=${assets_url%\{*}
curl -X POST \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "Content-Type: application/vnd.android.package-archive" \
--data-binary "@$asset_path" \
"$base_url?name=$asset_name"
"$upload_url"

0 comments on commit 6ade2eb

Please sign in to comment.