Publish release #73
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish release | |
| on: workflow_dispatch | |
| env: | |
| XCODE_VERSION: "['26.1', '26.2', '26.3', '26.4', '26.5']" | |
| TEST_XCODE_VERSION: '26.5' | |
| jobs: | |
| prepare: | |
| runs-on: ubuntu-latest | |
| name: Prepare outputs | |
| outputs: | |
| XCODE_VERSIONS_MATRIX: ${{ env.XCODE_VERSION }} | |
| VERSION: ${{ steps.get-version.outputs.VERSION }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Compute outputs | |
| run: | | |
| echo "XCODE_VERSIONS_MATRIX=${{ env.XCODE_VERSION }}" >> $GITHUB_OUTPUT | |
| - name: Read SDK version | |
| id: get-version | |
| run: | | |
| version="$(sed -n 's/^VERSION=\(.*\)$/\1/p' "${GITHUB_WORKSPACE}/dependencies.list")" | |
| echo "VERSION=$version" >> $GITHUB_OUTPUT | |
| tag-release: | |
| runs-on: ubuntu-latest | |
| name: Tag Release | |
| needs: prepare | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: rickstaa/action-create-tag@v1 | |
| id: "tag_create" | |
| with: | |
| tag: "v${{ needs.prepare.outputs.VERSION }}" | |
| tag_exists_error: false | |
| message: "" | |
| create-release: | |
| runs-on: macos-26 | |
| name: Create github release | |
| needs: [tag-release, prepare] | |
| env: | |
| GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| bundler-cache: true | |
| - name: Create Github release | |
| run: bundle exec ./build.sh publish-github ${{ github.sha }} | |
| publish-cocoapods: | |
| runs-on: macos-26 | |
| name: Publish Cocoapods specs | |
| needs: [tag-release, prepare] | |
| env: | |
| COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| bundler-cache: true | |
| - name: Publish | |
| run: bundle exec ./build.sh publish-cocoapods v${{ needs.prepare.outputs.VERSION }} | |
| update-checker: | |
| runs-on: macos-26 | |
| name: Update to latest version update checker file | |
| needs: tag-release | |
| env: | |
| AWS_ACCESS_KEY_ID: ${{ secrets.UPDATE_CHECKER_ACCESS_KEY }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.UPDATE_CHECKER_SECRET_KEY }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| bundler-cache: true | |
| - run: brew install s3cmd | |
| - run: bundle exec ./build.sh publish-update-checker | |
| test-installation: | |
| runs-on: macos-26 | |
| name: Run installation test for ${{ matrix.platform }}, ${{ matrix.installation }} and ${{ matrix.linkage }} | |
| needs: [create-release, prepare, publish-cocoapods] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: [ios, osx, watchos, tvos, catalyst, visionos] | |
| installation: [cocoapods, spm, carthage, xcframework] | |
| linkage: [static, dynamic] | |
| exclude: | |
| - installation: carthage | |
| linkage: static | |
| - platform: catalyst | |
| installation: carthage | |
| - platform: osx | |
| installation: xcframework | |
| linkage: static | |
| - platform: watchos | |
| installation: xcframework | |
| linkage: static | |
| - platform: tvos | |
| installation: xcframework | |
| linkage: static | |
| - platform: catalyst | |
| installation: xcframework | |
| linkage: static | |
| - platform: visionos | |
| installation: xcframework | |
| linkage: static | |
| - platform: catalyst | |
| installation: carthage | |
| linkage: static | |
| - platform: visionos | |
| installation: carthage | |
| - platform: visionos | |
| installation: cocoapods | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| bundler-cache: true | |
| - uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: ${{ env.TEST_XCODE_VERSION }} | |
| - name: Run installation test | |
| uses: nick-fields/retry@v3 | |
| env: | |
| REALM_TEST_RELEASE: ${{ needs.prepare.outputs.VERSION }} | |
| with: | |
| command: | | |
| cd examples/installation | |
| bundle exec ./build.rb ${{ matrix.platform }} ${{ matrix.installation }} ${{ matrix.linkage }} | |
| timeout_minutes: 30 | |
| max_attempts: 10 | |
| retry_wait_seconds: 60 | |
| retry_on: error |