-
Notifications
You must be signed in to change notification settings - Fork 37
75 lines (60 loc) · 1.79 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
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