test #13
Workflow file for this run
This file contains 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: Prepare Release | |
on: | |
push: | |
branches: | |
- "dp/migration_release_pipeline" | |
jobs: | |
prepare: | |
runs-on: ubuntu-latest | |
name: Create Draft Release to store artifacts | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Export GITHUB_TOKEN to workspace | |
run: echo "GITHUB_ACCESS_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV | |
- name: Install ruby | |
uses: ruby/setup-ruby@ec02537da5712d66d4d50a0f33b7eb52773b5ed1 | |
with: | |
ruby-version: '3.1.2' | |
- name: Install Gems | |
run: | | |
gem install octokit | |
- name: Create draft release to store artifacts. | |
run: ruby ./scripts/github_release.rb create-draft-release | |
build-docs: | |
runs-on: ubuntu-latest | |
name: Package docs and upload them to the draft release | |
needs: prepare | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Get Token | |
id: token | |
uses: yuki0n0/[email protected] | |
with: | |
# UUID. Can get from App Store Connect. | |
issuer id: ${{ secrets.APPLE_STORE_CONNECT_ISSUER_ID }} | |
# Key ID. Can get from App Store Connect. | |
key id: ${{ secrets.APPLE_STORE_CONNECT_KEY_ID }} | |
# P8 private key. Can get from App Store Connect. | |
key: ${{ secrets.APPLE_STORE_CONNECT_API_KEY }} | |
- name: Run release_package-docs_release xcode cloud build and wait for it to finish, this xcode cloud upload realm-docs.zip assets to the artifacts draft release | |
run: | | |
XCODE_VERSION="$(ruby ./scripts/xcode_cloud_release.rb docs_version)" | |
ruby ./scripts/xcode_cloud_helper.rb --run-release-workflow "release_package-docs_${XCODE_VERSION}" --token ${{ steps.token.outputs.token }} | |
build-product: | |
runs-on: ubuntu-latest | |
name: Package product for each xcode version. | |
needs: prepare | |
strategy: | |
matrix: | |
xcode-version: ['14.1', '14.2', '14.3.1', '15.0.1', '15.1'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Get Token | |
id: token | |
uses: yuki0n0/[email protected] | |
with: | |
# UUID. Can get from App Store Connect. | |
issuer id: ${{ secrets.APPLE_STORE_CONNECT_ISSUER_ID }} | |
# Key ID. Can get from App Store Connect. | |
key id: ${{ secrets.APPLE_STORE_CONNECT_KEY_ID }} | |
# P8 private key. Can get from App Store Connect. | |
key: ${{ secrets.APPLE_STORE_CONNECT_API_KEY }} | |
- name: Run release_package_${{ matrix.xcode-version }} which upload the package to the draft release and wait for it to complete or fail | |
run: ruby ./scripts/xcode_cloud_helper.rb --run-release-workflow "release_package_${{ matrix.xcode-version }}" --token ${{ steps.token.outputs.token }} | |
test-package-examples: | |
runs-on: ubuntu-latest | |
name: Test examples, using the packages releases | |
needs: build-product | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Get Token | |
id: token | |
uses: yuki0n0/[email protected] | |
with: | |
# UUID. Can get from App Store Connect. | |
issuer id: ${{ secrets.APPLE_STORE_CONNECT_ISSUER_ID }} | |
# Key ID. Can get from App Store Connect. | |
key id: ${{ secrets.APPLE_STORE_CONNECT_KEY_ID }} | |
# P8 private key. Can get from App Store Connect. | |
key: ${{ secrets.APPLE_STORE_CONNECT_API_KEY }} | |
- name: Run release_test-package-examples_15.1 which runs test over the packages produces by the previous step and wait for it to complete or fail | |
run: ruby ./scripts/xcode_cloud_helper.rb --run-release-workflow release_test-package-examples_15.1 --token ${{ steps.token.outputs.token }} | |
test-ios-static: | |
runs-on: ubuntu-latest | |
name: Run tests on iOS with configuration Static | |
needs: build-product | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Get Token | |
id: token | |
uses: yuki0n0/[email protected] | |
with: | |
# UUID. Can get from App Store Connect. | |
issuer id: ${{ secrets.APPLE_STORE_CONNECT_ISSUER_ID }} | |
# Key ID. Can get from App Store Connect. | |
key id: ${{ secrets.APPLE_STORE_CONNECT_KEY_ID }} | |
# P8 private key. Can get from App Store Connect. | |
key: ${{ secrets.APPLE_STORE_CONNECT_API_KEY }} | |
- name: Run release_ios-static_15.1 which runs test over the packages produces by the previous step and wait for it to complete or fail | |
run: ruby ./scripts/xcode_cloud_helper.rb --run-release-workflow release_ios-static_15.1 --token ${{ steps.token.outputs.token }} | |
test-osx-static: | |
runs-on: ubuntu-latest | |
name: Run tests on macOS | |
needs: build-product | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Get Token | |
id: token | |
uses: yuki0n0/[email protected] | |
with: | |
# UUID. Can get from App Store Connect. | |
issuer id: ${{ secrets.APPLE_STORE_CONNECT_ISSUER_ID }} | |
# Key ID. Can get from App Store Connect. | |
key id: ${{ secrets.APPLE_STORE_CONNECT_KEY_ID }} | |
# P8 private key. Can get from App Store Connect. | |
key: ${{ secrets.APPLE_STORE_CONNECT_API_KEY }} | |
- name: Run release_osx_15.1 which runs test over the packages produces by the previous step and wait for it to complete or fail | |
run: ruby ./scripts/xcode_cloud_helper.rb --run-release-workflow release_osx_15.1 --token ${{ steps.token.outputs.token }} | |
test-installation: | |
runs-on: ubuntu-latest | |
name: Run installation test on each xcode version | |
needs: build-product | |
env: | |
XCODE_VERSION: '15.1' | |
strategy: | |
matrix: | |
platform: ['ios', 'osx', 'watchos', 'tvos', 'catalys', 'visionos'] | |
installation: ['cocoapods', 'spm', 'carthage', 'xcframework'] | |
linkage: ['static', 'dynamic'] | |
exclude: | |
- installation: cartage | |
linkage: static | |
- platform: ['osx', 'watchos', 'tvos', 'catalys', 'visionos'] | |
installation: xcframework | |
linkage: static | |
- platform: catalyst | |
installation: carthage | |
linkage: static | |
- platform: visionos | |
installation: ['carthage', 'cocoapods'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Get Token | |
id: token | |
uses: yuki0n0/[email protected] | |
with: | |
# UUID. Can get from App Store Connect. | |
issuer id: ${{ secrets.APPLE_STORE_CONNECT_ISSUER_ID }} | |
# Key ID. Can get from App Store Connect. | |
key id: ${{ secrets.APPLE_STORE_CONNECT_KEY_ID }} | |
# P8 private key. Can get from App Store Connect. | |
key: ${{ secrets.APPLE_STORE_CONNECT_API_KEY }} | |
- name: Creates an XCode Cloud workflow to run the test | |
run: | | |
workflow_id="$(ruby ./scripts/xcode_cloud_helper.rb --create-workflow release_test-installation-${{ matrix.platform }}-${{ matrix.platform }}-${{ matrix.linkage }} --xcode-version $XCODE_VERSION --token ${{ steps.token.outputs.token }} --team-id ${{ secrets.APPLE_STORE_CONNECT_TEAM_ID }}" --prefix release)" | |
echo "WORKFLOW_ID=$workflow_id" >> $GITHUB_ENV | |
- name: Run release_test-installation-${{ matrix.platform }}-${{ matrix.platform }}-${{ matrix.linkage }} which runs installation tests for different installation methods, platforms and linkage. | |
run: | | |
ruby ./scripts/xcode_cloud_helper.rb --build-workflow ${{ github.WORKFLOW_ID }} --token ${{ steps.token.outputs.token }} |