From d07c49b8c3bd3aff2dbf5a6b7d9da033479a3c24 Mon Sep 17 00:00:00 2001 From: Adrian Castro <22133246+castdrian@users.noreply.github.com> Date: Tue, 5 Mar 2024 21:02:04 +0100 Subject: [PATCH] feat: configure altstore source --- .github/workflows/release-mobile.yml | 83 ++++++++++++------- apps/expo/{repo.config.json => app-repo.json} | 23 +++-- 2 files changed, 67 insertions(+), 39 deletions(-) rename apps/expo/{repo.config.json => app-repo.json} (56%) diff --git a/.github/workflows/release-mobile.yml b/.github/workflows/release-mobile.yml index c4378ec..07ae2c7 100644 --- a/.github/workflows/release-mobile.yml +++ b/.github/workflows/release-mobile.yml @@ -144,42 +144,61 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# app-repo: -# environment: -# name: github-pages -# url: ${{ steps.deployment.outputs.page_url }} -# runs-on: ubuntu-latest -# needs: [build-ios, release-app] -# steps: -# - name: Checkout -# uses: actions/checkout@v4 + app-repo: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: [build-ios, release-app] + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + merge-multiple: true -# - name: Install Node.js -# uses: actions/setup-node@v4 -# with: -# node-version: 21 + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: 21 -# - name: Create app repo -# run: | -# npm install -g altstore-github -# mkdir -p pages -# cd apps/expo -# npx altstore-github --config repo.config.json > app.json -# mv app.json ../../pages/app.json + - name: Create app repo + run: | + npm install -g altstore-github + cd apps/expo + npx altstore-github --config repo.config.json > app.json + mv app.json ../../pages/app.json -# - name: Setup Pages -# uses: actions/configure-pages@v4 + - name: Get new version and release date + id: vars + run: | + VERSION=$(jq -r '.version' 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 '.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' apps/expo/app-repo.json > temp.json + mkdir -p pages + mv temp.json pages/repo.json + + - name: Setup Pages + uses: actions/configure-pages@v4 -# - name: Build with Jekyll -# uses: actions/jekyll-build-pages@v1 -# with: -# source: ./pages -# destination: ./_site + - name: Build with Jekyll + uses: actions/jekyll-build-pages@v1 + with: + source: ./pages + destination: ./_site -# - name: Upload artifact -# uses: actions/upload-pages-artifact@v3 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 -# - name: Deploy to GitHub Pages -# id: deployment -# uses: actions/deploy-pages@v2 + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 diff --git a/apps/expo/repo.config.json b/apps/expo/app-repo.json similarity index 56% rename from apps/expo/repo.config.json rename to apps/expo/app-repo.json index 63ab1f8..ea20680 100644 --- a/apps/expo/repo.config.json +++ b/apps/expo/app-repo.json @@ -1,16 +1,25 @@ { + "name": "movie-web native apps", "apps": [ { "name": "movie-web", "bundleIdentifier": "dev.movieweb.app", - "filename": "movie-web.ipa", - "githubOwner": "movie-web", - "githubRepository": "native-app", + "category": "entertainment", "developerName": "movie-web", - "subtitle": "A small app for watching movies and shows easily", - "localizedDescription": "This service works by displaying video files from third-party providers inside an intuitive and aesthetic user interface.", "iconURL": "https://github.com/movie-web/native-app/blob/master/apps/expo/assets/images/icon.png?raw=true", - "tintColor": "a87fd1" + "localizedDescription": "This service works by displaying video files from third-party providers inside an intuitive and aesthetic user interface.", + "subtitle": "A small app for watching movies and shows easily", + "tintColor": "a87fd1", + "versions": [ + { + "version": "", + "date": "", + "downloadURL": "https://github.com/movie-web/native-app/releases/latest/download/movie-web.ipa", + "size": 0 + } + ], + "appPermissions": {} } - ] + ], + "news": [] }