Publish new release #86
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 new release" | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: "The version number for the release" | |
| required: true | |
| webrtc_branch: | |
| description: "The branch of WebRTC to build from" | |
| required: true | |
| default: "main" | |
| skip_pods: | |
| description: "Skip the pods update" | |
| required: true | |
| type: boolean | |
| default: false | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: macos-15 | |
| steps: | |
| - name: Connect Bot | |
| uses: webfactory/ssh-agent@v0.7.0 | |
| with: | |
| ssh-private-key: ${{ secrets.BOT_SSH_PRIVATE_KEY }} | |
| - uses: actions/checkout@v4.1.1 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: 3.2 | |
| bundler-cache: true | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.x' | |
| - name: Git authentication | |
| run: | | |
| echo "This step is required to bypass `git credential-luci login`" | |
| git config --global credential.helper store | |
| echo "https://${GITHUB_ACTOR}:${{ secrets.GITHUB_TOKEN }}@github.com" > ~/.git-credentials | |
| - name: "Fastlane - Build" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.CI_BOT_GITHUB_TOKEN }} | |
| MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} | |
| APPSTORE_API_KEY: ${{ secrets.APPSTORE_API_KEY }} | |
| run: bundle exec fastlane build webrtc_branch:${{ inputs.webrtc_branch }} --verbose | |
| timeout-minutes: 120 | |
| - uses: 8398a7/action-slack@v3 | |
| if: failure() | |
| with: | |
| status: ${{ job.status }} | |
| text: "❌ StreamVideoWebRTC release failed! 🚢\n\ncc: <!subteam^S05RBQ69U1H>" | |
| fields: repo | |
| env: | |
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
| - uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: StreamWebRTC.xcframework.zip | |
| path: fastlane/StreamWebRTC.xcframework.zip | |
| retention-days: 7 | |
| - uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: WebRTC.xcframework.zip | |
| path: fastlane/WebRTC.xcframework.zip | |
| retention-days: 7 | |
| release: | |
| name: Publish new release | |
| runs-on: macos-15 | |
| needs: build | |
| steps: | |
| - name: Connect Bot | |
| uses: webfactory/ssh-agent@v0.7.0 | |
| with: | |
| ssh-private-key: ${{ secrets.BOT_SSH_PRIVATE_KEY }} | |
| - uses: actions/checkout@v4.1.1 | |
| with: | |
| fetch-depth: 0 | |
| - name: Download WebRTC | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: WebRTC.xcframework.zip | |
| path: fastlane/ | |
| - name: Download StreamWebRTC | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: StreamWebRTC.xcframework.zip | |
| path: fastlane/ | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: 3.2 | |
| bundler-cache: true | |
| - name: "Fastlane - Publish Release" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.CI_BOT_GITHUB_TOKEN }} | |
| COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} | |
| MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} | |
| APPSTORE_API_KEY: ${{ secrets.APPSTORE_API_KEY }} | |
| run: bundle exec fastlane release version:${{ inputs.version }} skip_pods:${{ inputs.skip_pods }} --verbose | |
| timeout-minutes: 20 | |
| - uses: 8398a7/action-slack@v3 | |
| if: failure() | |
| with: | |
| status: ${{ job.status }} | |
| text: "❌ StreamVideoWebRTC release failed! 🚢\n\ncc: <!subteam^S05RBQ69U1H>" | |
| fields: repo | |
| env: | |
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
| - uses: 8398a7/action-slack@v3 | |
| with: | |
| status: ${{ job.status }} | |
| text: "🎉 The new release has been shipped! 🚢\n\ncc: <!subteam^S05RBQ69U1H>" | |
| fields: repo | |
| env: | |
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |