mirror of
https://github.com/movie-web/native-app.git
synced 2025-09-13 16:43:25 +00:00
chore: adjust release workflow
This commit is contained in:
32
.github/workflows/release-mobile.yml
vendored
32
.github/workflows/release-mobile.yml
vendored
@@ -29,14 +29,6 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
PACKAGEJSON_DIR: 'apps/expo'
|
PACKAGEJSON_DIR: 'apps/expo'
|
||||||
|
|
||||||
- name: Upload json files as artifact
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: json
|
|
||||||
path: |
|
|
||||||
./apps/expo/package.json
|
|
||||||
./apps/expo/app-repo.json
|
|
||||||
|
|
||||||
build-android:
|
build-android:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -46,6 +38,9 @@ jobs:
|
|||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Pull version bump
|
||||||
|
run: git pull --all
|
||||||
|
|
||||||
- name: Install Node.js
|
- name: Install Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
@@ -89,6 +84,9 @@ jobs:
|
|||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Pull version bump
|
||||||
|
run: git pull --all
|
||||||
|
|
||||||
- name: Xcode Select Version
|
- name: Xcode Select Version
|
||||||
uses: maxim-lobanov/setup-xcode@v1
|
uses: maxim-lobanov/setup-xcode@v1
|
||||||
with:
|
with:
|
||||||
@@ -130,6 +128,12 @@ jobs:
|
|||||||
needs: [build-android, build-ios]
|
needs: [build-android, build-ios]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Pull version bump
|
||||||
|
run: git pull --all
|
||||||
|
|
||||||
- name: Download build artifacts
|
- name: Download build artifacts
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
@@ -138,6 +142,8 @@ jobs:
|
|||||||
- name: Get package version
|
- name: Get package version
|
||||||
id: package-version
|
id: package-version
|
||||||
uses: martinbeentjes/npm-get-version-action@v1.3.1
|
uses: martinbeentjes/npm-get-version-action@v1.3.1
|
||||||
|
with:
|
||||||
|
path: apps/expo
|
||||||
|
|
||||||
- name: Create GitHub Release
|
- name: Create GitHub Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
@@ -160,10 +166,8 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [build-ios, release-app]
|
needs: [build-ios, release-app]
|
||||||
steps:
|
steps:
|
||||||
- name: Download build artifacts
|
- name: Checkout code
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
|
||||||
merge-multiple: true
|
|
||||||
|
|
||||||
- name: Install Node.js
|
- name: Install Node.js
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
@@ -173,7 +177,7 @@ jobs:
|
|||||||
- name: Get new version and release date
|
- name: Get new version and release date
|
||||||
id: vars
|
id: vars
|
||||||
run: |
|
run: |
|
||||||
VERSION=$(jq -r '.version' package.json)
|
VERSION=$(jq -r '.version' apps/expo/package.json)
|
||||||
DATE=$(date -Iseconds)
|
DATE=$(date -Iseconds)
|
||||||
echo "::set-output name=version::$VERSION"
|
echo "::set-output name=version::$VERSION"
|
||||||
echo "::set-output name=date::$DATE"
|
echo "::set-output name=date::$DATE"
|
||||||
@@ -181,7 +185,7 @@ jobs:
|
|||||||
- name: Update app-repo.json
|
- name: Update app-repo.json
|
||||||
run: |
|
run: |
|
||||||
IPA_SIZE=$(stat -c%s "movie-web.ipa")
|
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)' app-repo.json > temp.json
|
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
|
mkdir -p pages
|
||||||
mv temp.json pages/repo.json
|
mv temp.json pages/repo.json
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user