Skip to content

Commit 4d1dc08

Browse files
authored
Update build-apk.yml
1 parent 5e28d94 commit 4d1dc08

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/build-apk.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,13 @@ jobs:
5656
echo "VERSION_NAME=$VERSION_NAME" >> $GITHUB_ENV
5757
cp app/build/outputs/apk/release/app-release.apk ./BirthdayReminder-v$VERSION_NAME.apk
5858
59+
- name: Generate timestamped tag name
60+
id: tag
61+
run: |
62+
TAG_NAME=v$(date +'%Y%m%d%H%M%S')
63+
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
64+
echo "tag_name=$TAG_NAME" >> $GITHUB_OUTPUT
65+
5966
- name: Create update.json
6067
run: |
6168
VERSION_NAME=1.0.0
@@ -74,6 +81,16 @@ jobs:
7481
github_token: ${{ secrets.GITHUB_TOKEN }}
7582
publish_dir: ./ # Burada hem APK hem update.json var
7683
destination_dir: releases
84+
85+
- name: Create GitHub Release and upload APK
86+
uses: softprops/action-gh-release@v1
87+
with:
88+
tag_name: ${{ env.TAG_NAME }}
89+
name: ${{ env.TAG_NAME }}
90+
body: "Otomatik yayın"
91+
files: BirthdayReminder-v1.0.0.apk
92+
env:
93+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7794

7895
env:
7996
KEYSTORE_FILE_PATH: ${{ secrets.KEYSTORE_FILE_PATH }}

0 commit comments

Comments
 (0)