diff --git a/.github/actions/build-xcframework/action.yml b/.github/actions/build-xcframework/action.yml index 0e0593ba3..340ea75f8 100644 --- a/.github/actions/build-xcframework/action.yml +++ b/.github/actions/build-xcframework/action.yml @@ -49,7 +49,7 @@ runs: using: 'composite' steps: - name: Setup Xcode - uses: ./.github/actions/setup-xcode + uses: OpenSwiftUIProject/setup-xcode@v2 with: xcode-version: ${{ inputs.xcode-version }} - name: Set up build environment diff --git a/.github/actions/setup-xcode/action.yml b/.github/actions/setup-xcode/action.yml deleted file mode 100644 index 746274316..000000000 --- a/.github/actions/setup-xcode/action.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: 'Setup Xcode Conditionally' -description: 'Check current Xcode version and setup if different from required version (Avoid unessary sudo/password input for self hosted runner)' - -inputs: - xcode-version: - description: 'Required Xcode version' - required: true - -outputs: - current-version: - description: 'Current Xcode version' - value: ${{ steps.current-xcode.outputs.version }} - setup-skipped: - description: 'Whether Xcode setup was skipped' - value: ${{ steps.xcode-check.outputs.skip-setup }} - -runs: - using: 'composite' - steps: - - name: Get current Xcode version - id: current-xcode - shell: bash - run: | - CURRENT_VERSION=$(xcode-select -p | grep -o '[0-9]\+\.[0-9]\+' || echo "none") - echo "version=$CURRENT_VERSION" >> $GITHUB_OUTPUT - echo "Current Xcode version: $CURRENT_VERSION" - - - name: Check if Xcode version matches - id: xcode-check - shell: bash - run: | - CURRENT="${{ steps.current-xcode.outputs.version }}" - REQUIRED="${{ inputs.xcode-version }}" - if [ "$CURRENT" = "$REQUIRED" ]; then - echo "skip-setup=true" >> $GITHUB_OUTPUT - echo "✅ Xcode version matches: $CURRENT = $REQUIRED, skipping setup" - else - echo "skip-setup=false" >> $GITHUB_OUTPUT - echo "❌ Xcode version mismatch: $CURRENT ≠ $REQUIRED, setup required" - fi - - - name: Setup Xcode - if: steps.xcode-check.outputs.skip-setup == 'false' - uses: maxim-lobanov/setup-xcode@v1 - with: - xcode-version: ${{ inputs.xcode-version }} - - name: Swift version - shell: bash - run: swift --version \ No newline at end of file diff --git a/.github/workflows/compatibility_tests.yml b/.github/workflows/compatibility_tests.yml index 178575f28..4978c4192 100644 --- a/.github/workflows/compatibility_tests.yml +++ b/.github/workflows/compatibility_tests.yml @@ -28,7 +28,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Setup Xcode - uses: ./.github/actions/setup-xcode + uses: OpenSwiftUIProject/setup-xcode@v2 with: xcode-version: ${{ matrix.xcode-version }} - name: Set up build environment @@ -80,7 +80,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Setup Xcode - uses: ./.github/actions/setup-xcode + uses: OpenSwiftUIProject/setup-xcode@v2 with: xcode-version: ${{ matrix.xcode-version }} - name: Set up build environment diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 95da79d9e..d800e74c3 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -34,7 +34,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Setup Xcode - uses: ./.github/actions/setup-xcode + uses: OpenSwiftUIProject/setup-xcode@v2 with: xcode-version: ${{ matrix.xcode-version }} - name: Set up build environment diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 0d4eb9b2d..2ed7391ff 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -29,7 +29,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Setup Xcode - uses: ./.github/actions/setup-xcode + uses: OpenSwiftUIProject/setup-xcode@v2 with: xcode-version: ${{ matrix.xcode-version }} - name: Set up build environment diff --git a/.github/workflows/uitests.yml b/.github/workflows/uitests.yml index 8f638e00f..2322f8cd0 100644 --- a/.github/workflows/uitests.yml +++ b/.github/workflows/uitests.yml @@ -34,7 +34,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Setup Xcode - uses: ./.github/actions/setup-xcode + uses: OpenSwiftUIProject/setup-xcode@v2 with: xcode-version: ${{ matrix.xcode-version }} - name: Set up build environment @@ -73,7 +73,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Setup Xcode - uses: ./.github/actions/setup-xcode + uses: OpenSwiftUIProject/setup-xcode@v2 with: xcode-version: ${{ matrix.xcode-version }} - name: Set up build environment