|
13 | 13 | # Allows you to run this workflow manually from the Actions tab
|
14 | 14 | workflow_dispatch:
|
15 | 15 |
|
16 |
| -# A workflow run is made up of one or more jobs that can run sequentially or in parallel |
17 | 16 | jobs:
|
18 |
| - # This workflow contains a single job called "build" |
19 | 17 | build:
|
20 |
| - # The type of runner that the job will run on |
| 18 | + name: Upload Release Asset |
21 | 19 | runs-on: ubuntu-latest
|
22 |
| - |
23 |
| - # Steps represent a sequence of tasks that will be executed as part of the job |
24 | 20 | steps:
|
25 |
| - - uses: actions/checkout@v2 |
26 |
| - - uses: actions/setup-java@v2 |
27 |
| - with: |
28 |
| - distribution: 'zulu' |
29 |
| - java-version: '8' |
30 |
| - - uses: subosito/flutter-action@v1 |
31 |
| - with: |
32 |
| - flutter-version: '2.5.3' |
33 |
| - - run: flutter pub get |
34 |
| - - run: flutter build apk --split-per-abi |
35 |
| - - run: ls |
| 21 | + - name: Checkout code |
| 22 | + uses: actions/checkout@v2 |
| 23 | + - name: Build project # This would actually build your project, using zip for an example artifact |
| 24 | + run: | |
| 25 | + flutter pub get |
| 26 | + flutter build apk --split-per-abi |
| 27 | + - name: Create Release |
| 28 | + id: create_release |
| 29 | + uses: actions/create-release@v1 |
| 30 | + env: |
| 31 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 32 | + with: |
| 33 | + tag_name: ${{ github.ref }} |
| 34 | + release_name: Release ${{ github.ref }} |
| 35 | + draft: false |
| 36 | + prerelease: false |
| 37 | + - name: Upload Release Asset |
| 38 | + id: upload-release-asset-arm32 |
| 39 | + uses: actions/upload-release-asset@v1 |
| 40 | + env: |
| 41 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 42 | + with: |
| 43 | + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps |
| 44 | + asset_path: ./build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk |
| 45 | + asset_name: npay_arm32.apk |
| 46 | + asset_content_type: application/vnd.android.package-archive |
| 47 | + - name: Upload Release Asset |
| 48 | + id: upload-release-asset-arm64 |
| 49 | + uses: actions/upload-release-asset@v1 |
| 50 | + env: |
| 51 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 52 | + with: |
| 53 | + upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps |
| 54 | + asset_path: ./build/app/outputs/flutter-apk/app-arm64-v8a-release.apk |
| 55 | + asset_name: npay_arm64.apk |
| 56 | + asset_content_type: application/vnd.android.package-archive |
36 | 57 |
|
0 commit comments