5858 default : true
5959
6060jobs :
61- Validate :
61+ validate-new-version :
6262 runs-on : ubuntu-latest
6363 permissions :
6464 contents : read
6767 uses : actions/checkout@v3
6868 with :
6969 fetch-depth : 0
70+ - name : Install Node.js
71+ uses : actions/setup-node@v4
72+ with :
73+ node-version : 20
7074 - name : Validate new version
7175 if : inputs.new-version
7276 run : |
@@ -76,13 +80,11 @@ jobs:
7680 echo "Current version : $CURRENT_VERSION"
7781 echo "New version : $NEW_VERSION"
7882
79- npx semver -r ">=$CURRENT_VERSION" "$NEW_VERSION" > /dev/null
83+ npx semver -r ">=$CURRENT_VERSION" "$NEW_VERSION" > /dev/null || echo "❌ New version must be greater than or equal to current version ($CURRENT_VERSION)"
8084
81- if [ $? -ne 0 ]; then
82- echo "❌ New version must be greater than or equal to current version ($CURRENT_VERSION)"
83- exit 1
84- fi
85- Build :
85+ echo "✅ New version is valid"
86+ build :
87+ needs : validate-new-version
8688 runs-on : ${{ matrix.os }}
8789 permissions :
8890 contents : write
@@ -132,12 +134,18 @@ jobs:
132134 git config --global user.name "github-actions[bot]"
133135 git config --global user.email "github-actions[bot]@users.noreply.github.com"
134136 pnpm version ${{ inputs.new-version }} -m "chore: set app version to ${{ inputs.new-version }}"
137+
138+ - name : Setup latest version of Xcode
139+ uses : maxim-lobanov/setup-xcode@v1
140+ if : matrix.platform == 'ios'
141+ with :
142+ xcode-version : latest
135143
136- # - name: ⚙️ Run Prebuild
137- # run: pnpm prebuild:${{ inputs.environment }}
144+ - name : ⚙️ Run Prebuild
145+ run : pnpm prebuild:${{ inputs.environment }}
138146
139- # - name: 📱 Run Build for ${{ matrix.platform }}
140- # run: pnpm build:${{ inputs.environment }}:${{ matrix.platform }} --non-interactive --no-wait --message "Build ${{ inputs.environment }} for ${{ matrix.platform }}" --local
147+ - name : 📱 Run Build for ${{ matrix.platform }}
148+ run : pnpm build:${{ inputs.environment }}:${{ matrix.platform }} --non-interactive --no-wait --message "Build ${{ inputs.environment }} for ${{ matrix.platform }}" --local
141149
142150 - name : 📦 Push changes to repository
143151 if : inputs.new-version
0 commit comments