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 : 📦 Setup Node + PNPM
71+ uses : ./.github/actions/setup-node-pnpm-install
7072 - name : Validate new version
7173 if : inputs.new-version
7274 run : |
@@ -76,13 +78,11 @@ jobs:
7678 echo "Current version : $CURRENT_VERSION"
7779 echo "New version : $NEW_VERSION"
7880
79- npx semver -r ">=$CURRENT_VERSION" "$NEW_VERSION" > /dev/null
81+ npx semver -r ">=$CURRENT_VERSION" "$NEW_VERSION" > /dev/null || echo "❌ New version must be greater than or equal to current version ($CURRENT_VERSION)"
8082
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 :
83+ echo "✅ New version is valid"
84+ build :
85+ needs : validate-new-version
8686 runs-on : ${{ matrix.os }}
8787 permissions :
8888 contents : write
@@ -132,12 +132,18 @@ jobs:
132132 git config --global user.name "github-actions[bot]"
133133 git config --global user.email "github-actions[bot]@users.noreply.github.com"
134134 pnpm version ${{ inputs.new-version }} -m "chore: set app version to ${{ inputs.new-version }}"
135+
136+ - name : Setup latest version of Xcode
137+ uses : maxim-lobanov/setup-xcode@v1
138+ if : matrix.platform == 'ios'
139+ with :
140+ xcode-version : latest
135141
136- # - name: ⚙️ Run Prebuild
137- # run: pnpm prebuild:${{ inputs.environment }}
142+ - name : ⚙️ Run Prebuild
143+ run : pnpm prebuild:${{ inputs.environment }}
138144
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
145+ - name : 📱 Run Build for ${{ matrix.platform }}
146+ run : pnpm build:${{ inputs.environment }}:${{ matrix.platform }} --non-interactive --no-wait --message "Build ${{ inputs.environment }} for ${{ matrix.platform }}" --local
141147
142148 - name : 📦 Push changes to repository
143149 if : inputs.new-version
0 commit comments