11
11
12
12
jobs :
13
13
build-android :
14
- name : Build Android App
14
+ name : Build Android APK
15
15
runs-on : ubuntu-latest
16
+ outputs :
17
+ build_id : ${{ steps.build.outputs.BUILD_ID }}
16
18
steps :
17
19
- name : Checkout repository
18
20
uses : actions/checkout@v4
@@ -42,13 +44,22 @@ jobs:
42
44
fi
43
45
44
46
echo "BUILD_ID=$BUILD_ID" >> $GITHUB_ENV
47
+ echo "BUILD_ID=$BUILD_ID" >> $GITHUB_OUTPUT
45
48
env :
46
49
EXPO_TOKEN : ${{ secrets.EXPO_TOKEN }}
47
50
51
+ download-apk :
52
+ name : Download APK
53
+ runs-on : ubuntu-latest
54
+ needs : build-android
55
+ outputs :
56
+ apk_path : ${{ steps.download.outputs.APK_PATH }}
57
+ steps :
48
58
- name : Wait for EAS Build to Complete
49
59
run : |
60
+ BUILD_ID=${{ needs.build-android.outputs.build_id }}
50
61
RETRY_COUNT=0
51
- MAX_RETRIES=20
62
+ MAX_RETRIES=50
52
63
while [[ $RETRY_COUNT -lt $MAX_RETRIES ]]; do
53
64
BUILD_STATUS_JSON=$(npx eas build:view --build-id $BUILD_ID --json 2>/dev/null)
54
65
echo "Build status response: $BUILD_STATUS_JSON"
@@ -76,10 +87,28 @@ jobs:
76
87
EXPO_TOKEN : ${{ secrets.EXPO_TOKEN }}
77
88
78
89
- name : Download APK
90
+ id : download
79
91
run : |
80
92
echo "Downloading APK from: $APK_URL"
81
93
curl -L $APK_URL -o app-release.apk
82
94
ls -lh app-release.apk
95
+ echo "APK_PATH=app-release.apk" >> $GITHUB_OUTPUT
96
+
97
+ - name : Upload APK as artifact
98
+ uses : actions/upload-artifact@v4
99
+ with :
100
+ name : android-apk
101
+ path : app-release.apk
102
+
103
+ generate-changelog :
104
+ name : Generate Changelog
105
+ runs-on : ubuntu-latest
106
+ needs : build-android
107
+ outputs :
108
+ changelog : ${{ steps.changelog.outputs.CHANGELOG }}
109
+ steps :
110
+ - name : Checkout repository
111
+ uses : actions/checkout@v4
83
112
84
113
- name : Generate Changelog
85
114
id : changelog
@@ -92,13 +121,35 @@ jobs:
92
121
echo "CHANGELOG<<EOF" >> $GITHUB_ENV
93
122
cat changelog.txt >> $GITHUB_ENV
94
123
echo "EOF" >> $GITHUB_ENV
124
+ echo "CHANGELOG=$GITHUB_ENV" >> $GITHUB_OUTPUT
125
+
126
+ - name : Upload Changelog as artifact
127
+ uses : actions/upload-artifact@v4
128
+ with :
129
+ name : changelog
130
+ path : changelog.txt
131
+
132
+ create-release :
133
+ name : Create GitHub Release
134
+ runs-on : ubuntu-latest
135
+ needs : [download-apk, generate-changelog]
136
+ steps :
137
+ - name : Download APK artifact
138
+ uses : actions/download-artifact@v4
139
+ with :
140
+ name : android-apk
141
+
142
+ - name : Download Changelog artifact
143
+ uses : actions/download-artifact@v4
144
+ with :
145
+ name : changelog
95
146
96
147
- name : Create GitHub Release
97
148
uses : softprops/action-gh-release@v2
98
149
with :
99
150
tag_name : v1.0.${{ github.run_number }}
100
151
name : Release v1.0.${{ github.run_number }}
101
- body : ${{ env.CHANGELOG }}
152
+ body_path : changelog.txt
102
153
draft : false
103
154
prerelease : false
104
155
files : app-release.apk
0 commit comments