File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7171 vercel-project-id : ${{ secrets.VERCEL_PROJECT_ID }}
7272 github-token : ${{ secrets.GITHUB_TOKEN }}
7373 github-comment : true
74- working-directory : Build/WebGL/WebGL
74+ working-directory : Build/WebGL/WebGL
75+
76+ deployAndroid :
77+ name : Deploy Android APK
78+ runs-on : ubuntu-latest
79+ needs : buildForAllSupportedPlatforms
80+ permissions :
81+ pull-requests : write
82+ steps :
83+ - uses : actions/checkout@v4
84+ with :
85+ fetch-depth : 0
86+ - name : Download Android Build Artifact
87+ uses : actions/download-artifact@v3
88+ with :
89+ name : Build-Android
90+ path : Build/Android
91+ - name : Generate QR Code
92+ id : generate_qr
93+ run : |
94+ apk_url=$(gh api -X GET "repos/${{ github.repository }}/actions/artifacts" | jq -r '.artifacts[] | select(.name=="Build-Android") | .archive_download_url')
95+ echo $apk_url > apk_url.txt
96+ pip install qrcode[pil]
97+ python -m qrcode --output=qr_code.png $apk_url
98+ - name : Upload QR Code
99+ uses : actions/upload-artifact@v3
100+ with :
101+ name : qr-code
102+ path : qr_code.png
103+ - name : Post Comment with APK Link and QR Code
104+ run : |
105+ apk_url=$(gh api -X GET "repos/${{ github.repository }}/actions/artifacts" | jq -r '.artifacts[] | select(.name=="Build-Android") | .archive_download_url')
106+ gh pr comment ${{ github.event.pull_request.number }} --body "APK is available for download [here](${apk_url}). /qr_code.png)"
107+ env :
108+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments