Skip to content

Commit 95303be

Browse files
authored
Update deploy_android.yml
1 parent d29f09f commit 95303be

File tree

1 file changed

+11
-17
lines changed

1 file changed

+11
-17
lines changed

.github/workflows/deploy_android.yml

+11-17
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: deploy_android
33
on:
44
workflow_dispatch:
55

6+
permissions:
7+
contents: write
8+
69
jobs:
710
deploy:
811
runs-on: ubuntu-latest
@@ -38,21 +41,12 @@ jobs:
3841
version=$(grep '^version:' apps/app_main/pubspec.yaml | sed 's/version: //')
3942
echo "version=$version" >> $GITHUB_ENV
4043
41-
- name: Create GitHub Release
42-
id: create_release
43-
uses: actions/create-release@v1
44-
env:
45-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46-
with:
47-
tag_name: v${{ env.version }}
48-
release_name: Release v${{ env.version }}
49-
draft: false
50-
prerelease: false
44+
- name: Install GitHub CLI
45+
run: sudo apt-get install gh -y
5146

52-
- name: Upload Release
53-
uses: actions/upload-release-asset@v1
54-
with:
55-
upload_url: ${{ steps.create_release.outputs.upload_url }}
56-
asset_path: apps/app_main/build/app/outputs/flutter-apk/app-release.apk
57-
asset_name: app-release.apk
58-
asset_content_type: application/vnd.android.package-archive
47+
- name: Create GitHub Release and Upload APK
48+
run: |
49+
gh release create v${{ env.version }} apps/app_main/build/app/outputs/flutter-apk/app-release.apk --title "Release v${{ env.version }}"
50+
env:
51+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52+
shell: bash

0 commit comments

Comments
 (0)