Create new release #198
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: Create new release | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Release Version' | |
| required: true | |
| type: string | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| name: Run Tests | |
| runs-on: macos-26 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Select Xcode 26.1 | |
| run: sudo xcode-select --switch /Applications/Xcode_26.1.app | |
| - name: Test | |
| run: make XC_LOG=tests IOS_SIMULATOR="iPhone 17" TVOS_SIMULATOR="Apple TV" tests | |
| - name: Attach Xcode logs | |
| if: '!cancelled()' | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | |
| with: | |
| name: xcode-tests-logs | |
| path: "*-tests.log" | |
| release: | |
| name: Publish Release | |
| needs: [test] | |
| runs-on: macos-26 | |
| permissions: | |
| id-token: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Get GitHub token via dd-octo-sts | |
| uses: DataDog/dd-octo-sts-action@acaa02eee7e3bb0839e4272dacb37b8f3b58ba80 # v1.0.3 | |
| id: octo-sts | |
| with: | |
| scope: DataDog/dd-sdk-swift-testing | |
| policy: self.github.create-release.workflow-dispatch | |
| - name: Select Xcode 26.1 | |
| run: sudo xcode-select --switch /Applications/Xcode_26.1.app | |
| - name: Fix git repo url with obtained token | |
| env: | |
| GH_TOKEN: ${{ steps.octo-sts.outputs.token }} | |
| run: git remote set-url origin "https://x-access-token:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" | |
| - name: Build and upload XCFrameworks, create draft release | |
| env: | |
| GH_TOKEN: ${{ steps.octo-sts.outputs.token }} | |
| run: make XC_LOG=archive version=${{ github.event.inputs.version }} github_release | |
| - name: Attach Xcode logs | |
| if: '!cancelled()' | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | |
| with: | |
| name: xcode-archive-logs | |
| path: "*-archive.log" | |
| publish-pod: | |
| name: Publish Pod | |
| needs: [release] | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| ref: "${{ github.event.inputs.version }}" | |
| - name: Publish | |
| env: | |
| COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} | |
| run: make publish_pod |