diff --git a/.github/workflows/build-android.yml b/.github/workflows/build-android.yml index e0af913f..53aa6bad 100644 --- a/.github/workflows/build-android.yml +++ b/.github/workflows/build-android.yml @@ -34,7 +34,7 @@ jobs: ~/.cache/turbo android/.gradle android/app/build - key: ${{ runner.os }}-gradle-turbo-${{ hashFiles('**/yarn.lock', '**/build.gradle') }} + key: ${{ runner.os }}-gradle-turbo-${{ hashFiles('**/yarn.lock', '**/build.gradle', '**/package.json', 'android/gradle/wrapper/**') }} restore-keys: | ${{ runner.os }}-gradle-turbo- diff --git a/.github/workflows/build-bundle.yml b/.github/workflows/build-bundle.yml new file mode 100644 index 00000000..d76f9dc8 --- /dev/null +++ b/.github/workflows/build-bundle.yml @@ -0,0 +1,49 @@ +# .github/workflows/build-ios.yml + +name: Build JS Bundle + +on: + pull_request: + + +jobs: + build-bundle: + runs-on: macos-latest + + steps: + - name: ๐Ÿงพ Checkout repository + uses: actions/checkout@v4 + + - name: โš™๏ธ Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'yarn' + + - name: ๐Ÿ“ฆ Install dependencies + run: yarn install --network-concurrency 1 + + + - name: ๐Ÿงฉ Build JS bundle for iOS + run: | + mkdir -p ios/build + npx react-native bundle \ + --platform ios \ + --dev false \ + --entry-file index.js \ + --bundle-output ios/main.jsbundle \ + --assets-dest ios + + - name: ๐Ÿงฉ Build JS bundle for Android + run: | + mkdir -p android/app/src/main/assets + mkdir -p android/app/src/main/res + npx react-native bundle \ + --platform android \ + --dev false \ + --entry-file index.js \ + --bundle-output android/app/src/main/assets/index.android.bundle \ + --assets-dest android/app/src/main/res + + + \ No newline at end of file diff --git a/.github/workflows/build-ios.yml b/.github/workflows/build-ios.yml index f4c8f4e1..4f72107c 100644 --- a/.github/workflows/build-ios.yml +++ b/.github/workflows/build-ios.yml @@ -1,6 +1,14 @@ name: Build iOS IPA on: + workflow_dispatch: pull_request: + paths: + - 'ios/**' + - Gemfile + - package.json + - yarn.lock + - .github/workflows/build-ios.yml + - .github/workflows/publish-beta.yml jobs: build-ios: diff --git a/.github/workflows/maestro-test.yml b/.github/workflows/maestro-test.yml index 18b41e47..ce544aef 100644 --- a/.github/workflows/maestro-test.yml +++ b/.github/workflows/maestro-test.yml @@ -11,8 +11,6 @@ jobs: steps: - name: ๐Ÿ›’ Checkout uses: actions/checkout@v4 - with: - token: ${{ secrets.SIGNING_REPO_PAT }} - name: ๐Ÿ–ฅ Setup Node 20 uses: actions/setup-node@v4 @@ -35,7 +33,7 @@ jobs: ~/.cache/turbo android/.gradle android/app/build - key: ${{ runner.os }}-gradle-turbo-${{ hashFiles('**/yarn.lock', '**/build.gradle') }} + key: ${{ runner.os }}-gradle-turbo-${{ hashFiles('**/yarn.lock', '**/build.gradle', '**/package.json', 'android/gradle/wrapper/**') }} restore-keys: | ${{ runner.os }}-gradle-turbo- @@ -44,21 +42,7 @@ jobs: - name: ๐Ÿ’ฌ Disable OTA Updates and Enable Maestro Build run: node scripts/updateEnv.js OTA_UPDATE_ENABLED=false IS_MAESTRO_BUILD=true - - - name: ๐Ÿคซ Output TelemetryDeck Secrets to TelemetryDeck.json - run: | - echo "{" > telemetrydeck.json - echo "\"appID\": \"${{ secrets.TELEMETRYDECK_APPID }}\"," >> telemetrydeck.json - echo "\"clientUser\": \"anonymous\"," >> telemetrydeck.json - echo "\"app\": \"Jellify\"" >> telemetrydeck.json - echo "}" >> telemetrydeck.json - - - - name: ๐Ÿคซ Output Glitchtip Secrets to Glitchtip.json - run: | - echo "{" > glitchtip.json - echo "\"dsn\": \"${{ secrets.GLITCHTIP_DSN }}\"" >> glitchtip.json - echo "}" >> glitchtip.json + - name: โœ… Validate Config Files run: | @@ -78,9 +62,7 @@ jobs: run-maestro-tests: runs-on: ubuntu-latest needs: build-android - env: - JELLYFIN_TEST_ADDRESS: ${{ secrets.JELLYFIN_TEST_URL }} - JELLYFIN_TEST_USERNAME: ${{ secrets.JELLYFIN_TEST_USERNAME }} + steps: - name: ๐Ÿ›’ Checkout @@ -135,7 +117,7 @@ jobs: disable-animations: false avd-name: e2e_emulator script: | - node scripts/maestro-android.js ${{ env.JELLYFIN_TEST_ADDRESS }} ${{ env.JELLYFIN_TEST_USERNAME }} + node scripts/maestro-android.js "https://jellyfin.jellify.app" "jerry" - name: Store tests result uses: actions/upload-artifact@v4.3.4 if: always()