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:
|
app-repo:
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
environment:
|
|
||||||
name: github-pages
|
|
||||||
url: ${{ steps.deployment.outputs.page_url }}
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [build-ios, release-app]
|
needs: [build-ios, release-app]
|
||||||
steps:
|
steps:
|
||||||
@@ -184,38 +181,26 @@ jobs:
|
|||||||
- name: Pull version bump
|
- name: Pull version bump
|
||||||
run: git pull --all
|
run: git pull --all
|
||||||
|
|
||||||
- name: Install Node.js
|
- name: Download IPA artifact
|
||||||
uses: actions/setup-node@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
node-version: 21
|
name: ipa
|
||||||
|
|
||||||
- name: Get new version and release date
|
- name: Get new version and release date
|
||||||
id: vars
|
id: vars
|
||||||
run: |
|
run: |
|
||||||
VERSION=$(jq -r '.version' apps/expo/package.json)
|
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=version::$VERSION"
|
||||||
echo "::set-output name=date::$DATE"
|
echo "::set-output name=date::$DATE"
|
||||||
|
|
||||||
- name: Update app-repo.json
|
- name: Update app-repo.json
|
||||||
run: |
|
run: |
|
||||||
IPA_SIZE=$(stat -c%s "movie-web.ipa")
|
IPA_SIZE=$(stat -f%z "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
|
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}')
|
||||||
mkdir -p pages
|
jq --argjson newEntry "$NEW_ENTRY" '.apps[0].versions |= [$newEntry] + .' apps/expo/app-repo.json > temp.json && mv temp.json apps/expo/app-repo.json
|
||||||
mv temp.json pages/repo.json
|
|
||||||
|
- uses: EndBug/add-and-commit@v9
|
||||||
- name: Setup Pages
|
|
||||||
uses: actions/configure-pages@v4
|
|
||||||
|
|
||||||
- name: Build with Jekyll
|
|
||||||
uses: actions/jekyll-build-pages@v1
|
|
||||||
with:
|
with:
|
||||||
source: ./pages
|
default_author: github_actions
|
||||||
destination: ./_site
|
message: "chore: update app-repo.json"
|
||||||
|
|
||||||
- name: Upload artifact
|
|
||||||
uses: actions/upload-pages-artifact@v3
|
|
||||||
|
|
||||||
- name: Deploy to GitHub Pages
|
|
||||||
id: deployment
|
|
||||||
uses: actions/deploy-pages@v4
|
|
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "movie-web native apps",
|
"name": "movie-web",
|
||||||
"apps": [
|
"apps": [
|
||||||
{
|
{
|
||||||
"name": "movie-web",
|
"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.",
|
"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",
|
"subtitle": "A small app for watching movies and shows easily",
|
||||||
"tintColor": "a87fd1",
|
"tintColor": "a87fd1",
|
||||||
"versions": [
|
"versions": [],
|
||||||
{
|
|
||||||
"version": "",
|
|
||||||
"date": "",
|
|
||||||
"downloadURL": "https://github.com/movie-web/native-app/releases/latest/download/movie-web.ipa",
|
|
||||||
"size": 0
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"appPermissions": {}
|
"appPermissions": {}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
Reference in New Issue
Block a user