|
36 | 36 | run: |
|
37 | 37 | echo "Starting EAS build..."
|
38 | 38 |
|
39 |
| - # Start the build and capture the BUILD_ID |
40 | 39 | BUILD_JSON=$(npx eas build -p android --profile production --non-interactive --json --verbose)
|
41 | 40 | echo "EAS build response: $BUILD_JSON"
|
42 | 41 |
|
|
50 | 49 | echo "BUILD_ID=$BUILD_ID" >> $GITHUB_ENV
|
51 | 50 | echo "BUILD_ID=$BUILD_ID" >> $GITHUB_OUTPUT
|
52 | 51 |
|
53 |
| - # Stream real-time logs for the build |
54 | 52 | echo "Streaming build logs..."
|
55 | 53 | npx eas build:logs --build-id $BUILD_ID
|
56 | 54 |
|
|
83 | 81 | while [[ $RETRY_COUNT -lt $MAX_RETRIES ]]; do
|
84 | 82 | BUILD_STATUS_JSON=$(npx eas build:view --build-id $BUILD_ID --json 2>/dev/null)
|
85 | 83 |
|
86 |
| - # Debug: Log raw response to see what is returned |
87 | 84 | echo "Build status raw response: $BUILD_STATUS_JSON"
|
88 | 85 |
|
89 |
| - # Check if response is empty |
90 | 86 | if [[ -z "$BUILD_STATUS_JSON" || "$BUILD_STATUS_JSON" == "null" ]]; then
|
91 | 87 | echo "Error: Failed to fetch build status! Retrying in $SLEEP_TIME seconds..."
|
92 | 88 | RETRY_COUNT=$((RETRY_COUNT+1))
|
|
96 | 92 |
|
97 | 93 | BUILD_STATUS=$(echo "$BUILD_STATUS_JSON" | jq -r '.status' 2>/dev/null)
|
98 | 94 |
|
99 |
| - # Check if status is valid |
100 | 95 | if [[ -z "$BUILD_STATUS" || "$BUILD_STATUS" == "null" ]]; then
|
101 | 96 | echo "Error: Build status is empty! Retrying..."
|
102 | 97 | RETRY_COUNT=$((RETRY_COUNT+1))
|
@@ -170,4 +165,32 @@ jobs:
|
170 | 165 | echo "CHANGELOG=$GITHUB_ENV" >> $GITHUB_OUTPUT
|
171 | 166 |
|
172 | 167 | - 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