Skip to content

Commit

Permalink
ci: Update flutter-ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
phanatagama authored Sep 22, 2023
1 parent ea3218f commit 4a0af28
Showing 1 changed file with 37 additions and 2 deletions.
39 changes: 37 additions & 2 deletions .github/workflows/flutter-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,49 @@ jobs:
- run: flutter test

# Build apk.
- run: flutter build apk
- run: flutter build apk --release

# Upload generated apk to the artifacts.
- uses: actions/upload-artifact@v3
with:
name: release-apk
name: app-release
path: build/app/outputs/apk/release/app-release.apk

release:
name: Create GitHub Release
runs-on: ubuntu-latest
needs: build

steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Set up Git
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
- name: Generate release tag
id: tag
run: |
echo "::set-output name=release_tag::Flarax_$(date +"%Y.%m.%d_%H-%M")"
- name: Create Release
id: create_release
uses: actions/create-release@v1
with:
tag_name: ${{ steps.tag.outputs.release_tag }} # Ganti dengan tag versi yang sesuai
release_name: Release ${{ steps.tag.outputs.release_tag }} # Ganti dengan nama release yang sesuai
body: |
Describe your release here.
- name: Upload APK
id: upload-release-asset
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/app/outputs/apk/release/app-release.apk
asset_name: app-release.apk
asset_content_type: application/octet-stream

publish:
runs-on: ubuntu-latest
needs: [build]
Expand Down

0 comments on commit 4a0af28

Please sign in to comment.