-
Notifications
You must be signed in to change notification settings - Fork 14
93 lines (80 loc) · 2.6 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Release
on:
workflow_dispatch:
inputs:
tag:
description: 'tag/version'
required: true
default: '1.0.0'
action_tag:
description: 'create tag ("no" to skip)'
required: true
default: 'yes'
release_AEPAssurance:
description: 'release AEPAssurance to Cocoapods ("no" to skip)'
required: true
default: 'yes'
jobs:
release_assurance:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.branch }}
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '14.1'
- name: Install jq
run: brew install jq
- name: Install cocoapods
run: gem install cocoapods
- name: Check version in Podspec
run: |
set -eo pipefail
echo Target version: ${{ github.event.inputs.tag }}
make check-version VERSION=${{ github.event.inputs.tag }}
- name: SPM integration test
if: ${{ github.event.inputs.action_tag == 'yes' }}
run: |
set -eo pipefail
echo SPM integration test starts:
make test-SPM-integration
- name: podspec file verification
if: ${{ github.event.inputs.action_tag == 'yes' }}
run: |
set -eo pipefail
echo podspec file verification starts:
make test-podspec
- name: Build Artifact
if: ${{ github.event.inputs.action_tag == 'yes' }}
run: |
make archive
make zip
- name: Create GH Release
id: create_release
uses: release-drafter/release-drafter@v5
if: ${{ github.event.inputs.action_tag == 'yes' }}
with:
name: v${{ github.event.inputs.tag }}
tag: ${{ github.event.inputs.tag }}
version: ${{ github.event.inputs.tag }}
publish: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Artifact
uses: actions/upload-release-asset@v1
if: ${{ github.event.inputs.action_tag == 'yes' }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/AEPAssurance.xcframework.zip
asset_name: AEPAssurance-${{ github.event.inputs.tag }}.xcframework.zip
asset_content_type: application/zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish Pods - AEPAssurance
if: ${{ github.event.inputs.release_AEPAssurance == 'yes' }}
run: |
set -eo pipefail
pod trunk push AEPAssurance.podspec --allow-warnings --swift-version=5.1
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}