Skip to content

Commit 243ec22

Browse files
authored
ci: Update flutter-ci.yml
1 parent c9f0ab1 commit 243ec22

File tree

1 file changed

+21
-56
lines changed

1 file changed

+21
-56
lines changed

.github/workflows/flutter-ci.yml

+21-56
Original file line numberDiff line numberDiff line change
@@ -48,67 +48,32 @@ jobs:
4848
with:
4949
name: app-release
5050
path: build/app/outputs/apk/release/app-release.apk
51-
52-
release:
53-
name: Create GitHub Release
51+
52+
publish:
5453
runs-on: ubuntu-latest
55-
needs: build
56-
54+
needs: [build]
5755
steps:
58-
- name: Checkout Repository
59-
uses: actions/checkout@v2
60-
61-
- name: Set up Git
62-
run: |
63-
git config --global user.name "GitHub Actions"
64-
git config --global user.email "[email protected]"
56+
# 1
57+
- uses: actions/checkout@v3
58+
59+
- uses: actions/download-artifact@v3
60+
with:
61+
name: app-release
62+
path: build/app/outputs/apk/release/app-release.apk
63+
64+
- name: Display structure of downloaded files
65+
run: ls -R
66+
# 2
6567
- name: Generate release tag
6668
id: tag
6769
run: |
6870
echo "::set-output name=release_tag::Flarax_$(date +"%Y.%m.%d_%H-%M")"
69-
- name: Create Release
70-
id: create_release
71-
uses: actions/create-release@v1
72-
with:
73-
tag_name: ${{ steps.tag.outputs.release_tag }} # Ganti dengan tag versi yang sesuai
74-
release_name: Release ${{ steps.tag.outputs.release_tag }} # Ganti dengan nama release yang sesuai
75-
body: |
76-
Describe your release here.
77-
78-
- name: Upload APK
79-
id: upload-release-asset
80-
uses: actions/upload-release-asset@v1
71+
# 3
72+
- name: Release
73+
uses: softprops/action-gh-release@v1
74+
env:
75+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8176
with:
82-
upload_url: ${{ steps.create_release.outputs.upload_url }}
83-
asset_path: ./build/app/outputs/apk/release/app-release.apk
84-
asset_name: app-release.apk
85-
asset_content_type: application/octet-stream
86-
87-
# publish:
88-
# runs-on: ubuntu-latest
89-
# needs: [build]
90-
# steps:
91-
# # 1
92-
# - uses: actions/checkout@v3
93-
94-
# - uses: actions/download-artifact@v3
95-
# with:
96-
# name: release-apk
97-
# path: build/app/outputs/apk/release/app-release.apk
98-
99-
# - name: Display structure of downloaded files
100-
# run: ls -R
101-
# # 2
102-
# - name: Generate release tag
103-
# id: tag
104-
# run: |
105-
# echo "::set-output name=release_tag::Flarax_$(date +"%Y.%m.%d_%H-%M")"
106-
# # 3
107-
# - name: Release
108-
# uses: softprops/action-gh-release@v1
109-
# env:
110-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
111-
# with:
112-
# tag_name: ${{ steps.tag.outputs.release_tag }}
113-
# files: build/app/outputs/apk/release/app-release.apk
77+
tag_name: ${{ steps.tag.outputs.release_tag }}
78+
files: build/app/outputs/apk/release/app-release.apk
11479

0 commit comments

Comments
 (0)