Skip to content

Commit ea3218f

Browse files
authored
ci: Update flutter-ci.yml
1 parent 42b8dd9 commit ea3218f

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

.github/workflows/flutter-ci.yml

+30-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,36 @@ jobs:
4444
- run: flutter build apk
4545

4646
# Upload generated apk to the artifacts.
47-
- uses: actions/upload-artifact@v1
47+
- uses: actions/upload-artifact@v3
4848
with:
4949
name: release-apk
5050
path: build/app/outputs/apk/release/app-release.apk
51+
52+
publish:
53+
runs-on: ubuntu-latest
54+
needs: [build]
55+
steps:
56+
# 1
57+
- uses: actions/checkout@v3
58+
59+
- uses: actions/download-artifact@v3
60+
with:
61+
name: release-apk
62+
path: build/app/outputs/apk/release/app-release.apk
63+
64+
- name: Display structure of downloaded files
65+
run: ls -R
66+
# 2
67+
- name: Generate release tag
68+
id: tag
69+
run: |
70+
echo "::set-output name=release_tag::Flarax_$(date +"%Y.%m.%d_%H-%M")"
71+
# 3
72+
- name: Release
73+
uses: softprops/action-gh-release@v1
74+
env:
75+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
76+
with:
77+
tag_name: ${{ steps.tag.outputs.release_tag }}
78+
files: build/app/outputs/apk/release/app-release.apk
79+

0 commit comments

Comments
 (0)