-
Notifications
You must be signed in to change notification settings - Fork 0
129 lines (116 loc) · 4.63 KB
/
framework.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: Publish Frameworks
run-name: Publish Frameworks ${{ github.ref_name }}
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+'
workflow_dispatch:
inputs:
version:
description: 'Version build'
required: false
type: string
jobs:
publish:
name: Publish Affise SDK Frameworks
runs-on: macOS-12
steps:
- name: Checkout
uses: actions/checkout@v3
# Version
- name: Version Tag
id: version_tag
run: |
if [ -n "${{ inputs.version }}" ]; then
echo Version: ${{ inputs.version }}
echo "VERSION=${{ inputs.version }}" >> "$GITHUB_OUTPUT"
else
echo Version: ${{ github.ref_name }}
echo "VERSION=${{ github.ref_name }}" >> "$GITHUB_OUTPUT"
fi
- name: Setup Swift 5.7
uses: swift-actions/setup-swift@v1
with:
swift-version: "5.7"
- name: Create AffiseAttributionLib XCFramework
uses: unsignedapps/swift-create-xcframework@v2.3.0
with:
target: "AffiseAttributionLib, AffiseModuleAdvertising, AffiseModuleLink, AffiseModuleStatus, AffiseModuleSubscription"
# Release
- name: Release
if: ${{ success() }}
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Affise Attribution iOS SDK ${{ steps.version_tag.outputs.VERSION }}
draft: false
prerelease: false
# Upload AffiseAttributionLib
- name: Upload Release AffiseAttributionLib Framework 🗳
if: ${{ success() }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./AffiseAttributionLib.zip
asset_name: AffiseAttributionLib-${{ steps.version_tag.outputs.VERSION }}.xcframework.zip
asset_content_type: application/zip
# Upload AffiseModuleLink
- name: Upload Release AffiseModuleLink Framework 🗳
if: ${{ success() }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./AffiseModuleLink.zip
asset_name: AffiseModuleLink-${{ steps.version_tag.outputs.VERSION }}.xcframework.zip
asset_content_type: application/zip
# Upload AffiseModuleStatus
- name: Upload Release AffiseModuleStatus Framework 🗳
if: ${{ success() }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./AffiseModuleStatus.zip
asset_name: AffiseModuleStatus-${{ steps.version_tag.outputs.VERSION }}.xcframework.zip
asset_content_type: application/zip
# Upload AffiseModuleAdvertising
- name: Upload Release AffiseModuleAdvertising Framework 🗳
if: ${{ success() }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./AffiseModuleAdvertising.zip
asset_name: AffiseModuleAdvertising-${{ steps.version_tag.outputs.VERSION }}.xcframework.zip
asset_content_type: application/zip
# Upload AffiseModuleSubscription
- name: Upload Release AffiseModuleSubscription Framework 🗳
if: ${{ success() }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./AffiseModuleSubscription.zip
asset_name: AffiseModuleSubscription-${{ steps.version_tag.outputs.VERSION }}.xcframework.zip
asset_content_type: application/zip
# # Upload AffiseSKAdNetwork
# - name: Upload Release AffiseSKAdNetwork Framework 🗳
# if: ${{ success() }}
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: ./AffiseSKAdNetwork.zip
# asset_name: AffiseSKAdNetwork-${{ steps.version_tag.outputs.VERSION }}.xcframework.zip
# asset_content_type: application/zip