mirror of
https://github.com/movie-web/native-app.git
synced 2025-09-13 14:53:24 +00:00
chore: adjust app repo and workflow
This commit is contained in:
39
.github/workflows/release-mobile.yml
vendored
39
.github/workflows/release-mobile.yml
vendored
@@ -172,9 +172,6 @@ jobs:
|
||||
|
||||
app-repo:
|
||||
continue-on-error: true
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build-ios, release-app]
|
||||
steps:
|
||||
@@ -184,38 +181,26 @@ jobs:
|
||||
- name: Pull version bump
|
||||
run: git pull --all
|
||||
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@v4
|
||||
- name: Download IPA artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
node-version: 21
|
||||
name: ipa
|
||||
|
||||
- name: Get new version and release date
|
||||
id: vars
|
||||
run: |
|
||||
VERSION=$(jq -r '.version' apps/expo/package.json)
|
||||
DATE=$(date -Iseconds)
|
||||
DATE=$(date -u +"%Y-%m-%d")
|
||||
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
|
||||
|
||||
- name: Build with Jekyll
|
||||
uses: actions/jekyll-build-pages@v1
|
||||
IPA_SIZE=$(stat -f%z "movie-web.ipa")
|
||||
NEW_ENTRY=$(jq -n --arg version "${{ steps.vars.outputs.version }}" --arg date "${{ steps.vars.outputs.date }}" --arg size "$IPA_SIZE" --arg downloadURL "https://github.com/movie-web/native-app/releases/download/v${{ steps.vars.outputs.version }}/movie-web.ipa" '{version: $version, date: $date, size: ($size | tonumber), downloadURL: $downloadURL}')
|
||||
jq --argjson newEntry "$NEW_ENTRY" '.apps[0].versions |= [$newEntry] + .' apps/expo/app-repo.json > temp.json && mv temp.json apps/expo/app-repo.json
|
||||
|
||||
- uses: EndBug/add-and-commit@v9
|
||||
with:
|
||||
source: ./pages
|
||||
destination: ./_site
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
default_author: github_actions
|
||||
message: "chore: update app-repo.json"
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "movie-web native apps",
|
||||
"name": "movie-web",
|
||||
"apps": [
|
||||
{
|
||||
"name": "movie-web",
|
||||
@@ -10,14 +10,7 @@
|
||||
"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
|
||||
}
|
||||
],
|
||||
"versions": [],
|
||||
"appPermissions": {}
|
||||
}
|
||||
],
|
||||
|
Reference in New Issue
Block a user