Skip to content

Commit df9b2fe

Browse files
Auto-builder
Testing projects's auto-builder
1 parent 41c622f commit df9b2fe

File tree

1 file changed

+37
-16
lines changed

1 file changed

+37
-16
lines changed

.github/workflows/main.yml

Lines changed: 37 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,45 @@ on:
1313
# Allows you to run this workflow manually from the Actions tab
1414
workflow_dispatch:
1515

16-
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1716
jobs:
18-
# This workflow contains a single job called "build"
1917
build:
20-
# The type of runner that the job will run on
18+
name: Upload Release Asset
2119
runs-on: ubuntu-latest
22-
23-
# Steps represent a sequence of tasks that will be executed as part of the job
2420
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
3657

0 commit comments

Comments
 (0)