Skip to content

Commit

Permalink
CI: upload apk in PR (#1147)
Browse files Browse the repository at this point in the history
Signed-off-by: Caijinglong <cjl_spy@163.com>
  • Loading branch information
CaiJingLong authored Jun 19, 2024
1 parent d61bda8 commit 261fcd8
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion .github/workflows/runnable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest ]
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
Expand All @@ -99,7 +101,28 @@ jobs:
cache: true
- run: flutter doctor -v
- run: flutter pub get
- run: cd example; flutter build apk --debug
- run: flutter build apk --release
name: Build apk
working-directory: ${{ github.workspace }}/example
- name: Upload artifact
uses: actions/upload-artifact@v4
id: apk
with:
if-no-files-found: error
path: ${{ github.workspace }}/example/build/app/outputs/flutter-apk/app-release.apk
name: app-release-${{github.sha}}.apk
- name: comment url in pull request
uses: actions/github-script@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Download apk from [here](${{ steps.apk.outputs.artifact-url }}) for ${{ github.sha}}'
})

test_android_on_windows:
needs: analyze
Expand Down

0 comments on commit 261fcd8

Please sign in to comment.