-
Notifications
You must be signed in to change notification settings - Fork 1
Add files via upload #65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| ## Android Build Process: Required Domains for Network Access | ||
|
|
||
| To successfully download all dependencies for Android builds, the following domains must be accessible: | ||
|
|
||
| - `dl.google.com` — Android SDK and build tools. | ||
| - `maven.google.com` — Official Maven repository for Android components. | ||
| - `repo1.maven.org` — Maven Central repository for Gradle dependencies. | ||
| - `services.gradle.org` — Gradle initialization and wrapper scripts. | ||
| - `storage.googleapis.com` — Android build tool mirrors. | ||
| - `github.com` and `objects.githubusercontent.com` — Repository source checkout, actions, and artifact releases. | ||
| - `actions.githubusercontent.com` — CI runner-based token exchange for action workflows. | ||
|
|
||
| ### Verification Checklist | ||
|
|
||
| - Ensure these domains are reachable from self-hosted runners, or configure network/firewall settings to allow access. | ||
| - Monitor workflow logs for blocked domains and update the list as necessary. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| name: Build WebLabs APK | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| - 'release/**' | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| build-apk: | ||
| name: Build APK | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| GRADLE_OPTS: -Dorg.gradle.jvmargs=-Xmx3g | ||
| ANDROID_HOME: ${{ runner.temp }}/android-sdk | ||
| PATH: ${{ runner.temp }}/android-sdk/cmdline-tools/latest/bin:${{ runner.temp }}/android-sdk/emulator:$PATH | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Set up Java (required for Gradle) | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| distribution: 'temurin' | ||
| java-version: '17' | ||
|
|
||
| # Optional: Cache Gradle packages | ||
| - name: Cache Gradle packages | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| ~/.gradle/caches | ||
| ~/.gradle/wrapper | ||
| key: gradle-${{ runner.os }}-${{ hashFiles('**/gradle-wrapper.properties', '**/*.gradle*', '**/*.gradle.kts') }} | ||
| restore-keys: | | ||
| gradle-${{ runner.os }}- | ||
|
|
||
| # Download and set up Android SDK | ||
| - name: Install Android SDK | ||
| run: | | ||
| mkdir -p $ANDROID_HOME/cmdline-tools | ||
| curl -o sdk.zip https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip | ||
| unzip -q sdk.zip -d $ANDROID_HOME/cmdline-tools | ||
| mv $ANDROID_HOME/cmdline-tools/cmdline-tools $ANDROID_HOME/cmdline-tools/latest | ||
| yes | sdkmanager --licenses | ||
| sdkmanager --update | ||
| sdkmanager "platform-tools" "platforms;android-34" "build-tools;34.0.0" | ||
|
Comment on lines
+41
to
+49
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Android SDK is being downloaded and installed manually from a hardcoded URL. This approach is brittle and can break if the URL changes or the file is moved. It is better to use a dedicated setup action like |
||
|
|
||
| # Build APK | ||
| - name: Assemble release APK | ||
| run: | | ||
| ./gradlew assembleRelease | ||
|
|
||
| # Collect and upload APK artifact(s) | ||
| - name: Upload APK artifact | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: WebLabs-MobIDE-apk | ||
| path: app/build/outputs/**/*.apk | ||
|
|
||
| # Upload build logs if the build fails | ||
| - name: Upload Build Logs | ||
| if: failure() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: WebLabs-MobIDE-build-logs | ||
| path: | | ||
| **/build/*.log | ||
| app/build/outputs/**/*.log | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file appears to be a GitHub Actions workflow but has a
.txtextension and versioning in its name. To be recognized by GitHub Actions, workflow files must be located in the.github/workflows/directory and have a.ymlor.yamlextension. Please rename this file tobuild-weblabs-apk.ymland place it in the correct directory. This comment applies to many other workflow-like files in this pull request.