diff --git a/.github/workflows/build-mobile-comment.yml b/.github/workflows/build-mobile-comment.yml index 29dc0fb..bd86b4e 100644 --- a/.github/workflows/build-mobile-comment.yml +++ b/.github/workflows/build-mobile-comment.yml @@ -5,96 +5,95 @@ on: types: [created] permissions: - contents: write - pull-requests: write + contents: write + pull-requests: write -jobs: - build-android: - runs-on: ubuntu-latest - if: github.event.issue.pull_request && contains(github.event.comment.body, '/build') - steps: - - uses: xt0rted/pull-request-comment-branch@v2 - id: comment-branch +jobs: + build-android: + runs-on: ubuntu-latest + if: github.event.issue.pull_request && contains(github.event.comment.body, '/build') + steps: + - uses: xt0rted/pull-request-comment-branch@v2 + id: comment-branch - - name: Checkout code - uses: actions/checkout@v4 - with: - ref: ${{ steps.comment-branch.outputs.head_ref }} + - name: Checkout code + uses: actions/checkout@v4 + with: + ref: ${{ steps.comment-branch.outputs.head_ref }} - - name: Install Node.js - uses: actions/setup-node@v4 - with: - node-version: 21 - - - uses: pnpm/action-setup@v3 - name: Install pnpm - with: - version: 8 - run_install: false - - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'temurin' - - - name: Setup Android SDK - uses: android-actions/setup-android@v3 - - - name: Install dependencies - run: pnpm install - - - name: Build Android app - run: cd apps/expo && pnpm apk - - - name: Upload movie-web.apk as artifact - uses: actions/upload-artifact@v4 - with: - name: apk - path: ./apps/expo/android/app/build/movie-web.apk - - build-ios: - runs-on: macos-14 - if: github.event.issue.pull_request && contains(github.event.comment.body, '/build') - steps: - - uses: xt0rted/pull-request-comment-branch@v2 - id: comment-branch + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: 21 - - name: Checkout code - uses: actions/checkout@v4 - with: - ref: ${{ steps.comment-branch.outputs.head_ref }} - - - name: Xcode Select Version - uses: maxim-lobanov/setup-xcode@v1 - with: - xcode-version: '15.1.0' - - - name: Install Node.js - uses: actions/setup-node@v4 - with: - node-version: 21 - - - uses: pnpm/action-setup@v3 - name: Install pnpm - with: - version: 8 - run_install: false - - - name: Install dependencies - run: pnpm install + - uses: pnpm/action-setup@v3 + name: Install pnpm + with: + version: 8 + run_install: false - - name: Install xcbeautify - uses: Cyberbeni/install-swift-tool@v2 - with: - url: https://github.com/Cyberbeni/xcbeautify - - - name: Build iOS app - run: cd apps/expo && pnpm ipa - - - name: Upload movie-web.ipa as artifact - uses: actions/upload-artifact@v4 - with: - name: ipa - path: ./apps/expo/ios/build/movie-web.ipa - \ No newline at end of file + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: "17" + distribution: "temurin" + + - name: Setup Android SDK + uses: android-actions/setup-android@v3 + + - name: Install dependencies + run: pnpm install + + - name: Build Android app + run: cd apps/expo && pnpm apk + + - name: Upload movie-web.apk as artifact + uses: actions/upload-artifact@v4 + with: + name: apk + path: ./apps/expo/android/app/build/movie-web.apk + + build-ios: + runs-on: macos-14 + if: github.event.issue.pull_request && contains(github.event.comment.body, '/build') + steps: + - uses: xt0rted/pull-request-comment-branch@v2 + id: comment-branch + + - name: Checkout code + uses: actions/checkout@v4 + with: + ref: ${{ steps.comment-branch.outputs.head_ref }} + + - name: Xcode Select Version + uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: "15.1.0" + + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: 21 + + - uses: pnpm/action-setup@v3 + name: Install pnpm + with: + version: 8 + run_install: false + + - name: Install dependencies + run: pnpm install + + - name: Install xcbeautify + uses: Cyberbeni/install-swift-tool@v2 + with: + url: https://github.com/cpisciotta/xcbeautify + + - name: Build iOS app + run: cd apps/expo && pnpm ipa + + - name: Upload movie-web.ipa as artifact + uses: actions/upload-artifact@v4 + with: + name: ipa + path: ./apps/expo/ios/build/movie-web.ipa diff --git a/.github/workflows/build-mobile.yml b/.github/workflows/build-mobile.yml index f004ffb..4bdcec9 100644 --- a/.github/workflows/build-mobile.yml +++ b/.github/workflows/build-mobile.yml @@ -9,7 +9,7 @@ permissions: contents: write pull-requests: write -jobs: +jobs: build-android: runs-on: ubuntu-latest @@ -31,8 +31,8 @@ jobs: - name: Set up JDK 17 uses: actions/setup-java@v4 with: - java-version: '17' - distribution: 'temurin' + java-version: "17" + distribution: "temurin" - name: Setup Android SDK uses: android-actions/setup-android@v3 @@ -59,13 +59,13 @@ jobs: - name: Xcode Select Version uses: maxim-lobanov/setup-xcode@v1 with: - xcode-version: '15.1.0' + xcode-version: "15.1.0" - name: Install Node.js uses: actions/setup-node@v4 with: node-version: 21 - + - uses: pnpm/action-setup@v3 name: Install pnpm with: @@ -78,7 +78,7 @@ jobs: - name: Install xcbeautify uses: Cyberbeni/install-swift-tool@v2 with: - url: https://github.com/Cyberbeni/xcbeautify + url: https://github.com/cpisciotta/xcbeautify - name: Build iOS app run: cd apps/expo && pnpm ipa diff --git a/.github/workflows/release-mobile.yml b/.github/workflows/release-mobile.yml index 07213a4..4661caa 100644 --- a/.github/workflows/release-mobile.yml +++ b/.github/workflows/release-mobile.yml @@ -13,23 +13,23 @@ permissions: jobs: bump-version: - runs-on: ubuntu-latest + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Automated Version Bump + uses: phips28/gh-action-bump-version@v11.0.0 + with: + skip-tag: "true" + commit-message: "chore: bump mobile version to {{version}} [skip ci]" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PACKAGEJSON_DIR: "apps/expo" - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Automated Version Bump - uses: phips28/gh-action-bump-version@v11.0.0 - with: - skip-tag: 'true' - commit-message: 'chore: bump mobile version to {{version}} [skip ci]' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PACKAGEJSON_DIR: 'apps/expo' - build-android: runs-on: ubuntu-latest needs: [bump-version] @@ -55,8 +55,8 @@ jobs: - name: Set up JDK 17 uses: actions/setup-java@v4 with: - java-version: '17' - distribution: 'temurin' + java-version: "17" + distribution: "temurin" - name: Setup Android SDK uses: android-actions/setup-android@v3 @@ -87,13 +87,13 @@ jobs: - name: Xcode Select Version uses: maxim-lobanov/setup-xcode@v1 with: - xcode-version: '15.1.0' + xcode-version: "15.1.0" - name: Install Node.js uses: actions/setup-node@v4 with: node-version: 21 - + - uses: pnpm/action-setup@v3 name: Install pnpm with: @@ -106,7 +106,7 @@ jobs: - name: Install xcbeautify uses: Cyberbeni/install-swift-tool@v2 with: - url: https://github.com/Cyberbeni/xcbeautify + url: https://github.com/cpisciotta/xcbeautify - name: Build iOS app run: cd apps/expo && pnpm ipa @@ -127,7 +127,7 @@ jobs: - name: Pull version bump run: git pull --all - + - name: Download build artifacts uses: actions/download-artifact@v4 with: @@ -142,7 +142,7 @@ jobs: - name: Create GitHub Release uses: softprops/action-gh-release@v1 with: - tag_name: v${{ steps.package-version.outputs.current-version }} + tag_name: v${{ steps.package-version.outputs.current-version }} files: | movie-web.apk movie-web.ipa @@ -155,8 +155,8 @@ jobs: app-repo: continue-on-error: true environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest needs: [build-ios, release-app] steps: @@ -174,18 +174,18 @@ jobs: - name: Get new version and release date id: vars run: | - VERSION=$(jq -r '.version' apps/expo/package.json) - DATE=$(date -Iseconds) - echo "::set-output name=version::$VERSION" - echo "::set-output name=date::$DATE" - + VERSION=$(jq -r '.version' apps/expo/package.json) + DATE=$(date -Iseconds) + echo "::set-output name=version::$VERSION" + echo "::set-output name=date::$DATE" + - name: Update app-repo.json run: | IPA_SIZE=$(stat -c%s "movie-web.ipa") jq --arg IPA_SIZE "$IPA_SIZE" '.apps[0].versions[0].version = "${{ steps.vars.outputs.version }}" | .apps[0].versions[0].date = "${{ steps.vars.outputs.date }}" | .apps[0].versions[0].size = ($IPA_SIZE | tonumber)' apps/expo/app-repo.json > temp.json mkdir -p pages mv temp.json pages/repo.json - + - name: Setup Pages uses: actions/configure-pages@v4