Release #15
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: Release | |
on: | |
workflow_dispatch: | |
jobs: | |
SPM: | |
name: "Build SPM" | |
environment: Tag | |
runs-on: macOS-12 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- destination: "OS=16.2,name=iPhone 14 Pro" | |
name: "iOS" | |
scheme: "PlayKit-Package" | |
- destination: "OS=16.0,name=Apple TV" | |
name: "tvOS" | |
scheme: "PlayKit-Package" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: ${{ matrix.name }} | |
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -scheme "${{ matrix.scheme }}" -destination "${{ matrix.destination }}" clean test | xcpretty | |
TAGGING: | |
name: "Add Git Tag" | |
runs-on: macOS-12 | |
environment: Tag | |
needs: SPM | |
outputs: | |
output1: ${{ steps.tagging.outputs.tag }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Switching Podspec to release mode | |
run: | | |
sh .github/release_mode.sh | |
- id: tagging | |
name: Add git tag | |
run: | | |
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} sh .github/tag.sh | |
PODS_PUSH: | |
name: "CocoaPods push" | |
runs-on: macOS-12 | |
environment: CocoaPods | |
needs: TAGGING | |
steps: | |
- uses: actions/checkout@v3 | |
- run: git pull | |
- name: Updating CocoaPods repo | |
run: pod repo update | |
- name: CocoaPods push | |
run: | | |
PODS_USER=${{ secrets.PODS_USER }} PODS_PASS=${{ secrets.PODS_PASS }} sh .github/cocoapods_publish.sh | |
- name: Prepare release notes | |
run: | | |
sh .github/release_notes.sh | |
- uses: ncipollo/release-action@v1 | |
with: | |
tag: ${{needs.TAGGING.outputs.output1}} | |
bodyFile: ".github/release_notes_template.md" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
draft: true |