Skip to content

Commit f3b11bc

Browse files
Fixing error.
1 parent bf2e13d commit f3b11bc

File tree

1 file changed

+29
-6
lines changed

1 file changed

+29
-6
lines changed

.github/workflows/eas-android-build.yml

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ jobs:
3636
run: |
3737
echo "Starting EAS build..."
3838
39-
# Start the build and capture the BUILD_ID
4039
BUILD_JSON=$(npx eas build -p android --profile production --non-interactive --json --verbose)
4140
echo "EAS build response: $BUILD_JSON"
4241
@@ -50,7 +49,6 @@ jobs:
5049
echo "BUILD_ID=$BUILD_ID" >> $GITHUB_ENV
5150
echo "BUILD_ID=$BUILD_ID" >> $GITHUB_OUTPUT
5251
53-
# Stream real-time logs for the build
5452
echo "Streaming build logs..."
5553
npx eas build:logs --build-id $BUILD_ID
5654
@@ -83,10 +81,8 @@ jobs:
8381
while [[ $RETRY_COUNT -lt $MAX_RETRIES ]]; do
8482
BUILD_STATUS_JSON=$(npx eas build:view --build-id $BUILD_ID --json 2>/dev/null)
8583
86-
# Debug: Log raw response to see what is returned
8784
echo "Build status raw response: $BUILD_STATUS_JSON"
8885
89-
# Check if response is empty
9086
if [[ -z "$BUILD_STATUS_JSON" || "$BUILD_STATUS_JSON" == "null" ]]; then
9187
echo "Error: Failed to fetch build status! Retrying in $SLEEP_TIME seconds..."
9288
RETRY_COUNT=$((RETRY_COUNT+1))
@@ -96,7 +92,6 @@ jobs:
9692
9793
BUILD_STATUS=$(echo "$BUILD_STATUS_JSON" | jq -r '.status' 2>/dev/null)
9894
99-
# Check if status is valid
10095
if [[ -z "$BUILD_STATUS" || "$BUILD_STATUS" == "null" ]]; then
10196
echo "Error: Build status is empty! Retrying..."
10297
RETRY_COUNT=$((RETRY_COUNT+1))
@@ -170,4 +165,32 @@ jobs:
170165
echo "CHANGELOG=$GITHUB_ENV" >> $GITHUB_OUTPUT
171166
172167
- name: Upload Changelog as artifact
173-
uses: actions
168+
uses: actions/upload-artifact@v4
169+
with:
170+
name: changelog
171+
path: changelog.txt
172+
173+
create-release:
174+
name: Create GitHub Release
175+
runs-on: ubuntu-latest
176+
needs: [download-apk, generate-changelog]
177+
steps:
178+
- name: Download APK artifact
179+
uses: actions/download-artifact@v4
180+
with:
181+
name: android-apk
182+
183+
- name: Download Changelog artifact
184+
uses: actions/download-artifact@v4
185+
with:
186+
name: changelog
187+
188+
- name: Create GitHub Release
189+
uses: softprops/action-gh-release@v2
190+
with:
191+
tag_name: v1.0.${{ github.run_number }}
192+
name: Release v1.0.${{ github.run_number }}
193+
body_path: changelog.txt
194+
draft: false
195+
prerelease: false
196+
files: app-release.apk

0 commit comments

Comments
 (0)