Skip to content

Commit c53570d

Browse files
MOEN-41290: Added Swift Package Manager distribution support
1 parent 1f3a55c commit c53570d

File tree

135 files changed

+741
-4025
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+741
-4025
lines changed

.github/workflows/cd.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,21 @@ on:
1212
type: string
1313
required: false
1414
default: ''
15+
release-cards:
16+
description: Whether to release Cards
17+
type: boolean
18+
required: false
19+
default: true
20+
release-geofence:
21+
description: Whether to release Geofence
22+
type: boolean
23+
required: false
24+
default: true
25+
release-inbox:
26+
description: Whether to release Inbox
27+
type: boolean
28+
required: false
29+
default: true
1530

1631
jobs:
1732
release:
@@ -24,8 +39,6 @@ jobs:
2439
path: scripts
2540
repository: moengage/sdk-automation-scripts
2641
token: ${{ secrets.SDK_BOT_ACCESS_TOKEN }}
27-
fetch-depth: 0
28-
fetch-tags: true
2942

3043
- name: Setup dev environment
3144
uses: ./scripts/actions/ios-action-setup
@@ -49,3 +62,11 @@ jobs:
4962
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
5063
MO_RELEASE_TICKET: ${{ inputs.ticket }}
5164
MO_SDK_DEPENDENCY_VERSION: ${{ inputs.sdk-version }}
65+
66+
- name: Release dependents
67+
run: ${{ github.workspace }}/source/Utilities/release_dependents.rb
68+
working-directory: source
69+
env:
70+
GH_TOKEN: ${{ secrets.SDK_BOT_ACCESS_TOKEN }}
71+
GITHUB_TOKEN: ${{ secrets.SDK_BOT_ACCESS_TOKEN }}
72+
MO_WORKFLOW_INPUTS: ${{ toJSON(inputs) }}

.github/workflows/ci.yml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: Run tests
2+
3+
on:
4+
pull_request:
5+
workflow_dispatch:
6+
inputs:
7+
environment_variables:
8+
description: Custom space separated environment variables, that can be used for setup task
9+
type: string
10+
required: false
11+
default: ''
12+
13+
concurrency:
14+
group: ci-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
cocoapods:
19+
name: Build and run tests for CocoaPods
20+
runs-on: macos-15
21+
22+
steps:
23+
- name: Set custom environment variables
24+
if: github.event_name == 'workflow_dispatch'
25+
run: |
26+
VARIABLES=(${{ inputs.environment_variables }})
27+
for variable in ${VARIABLES[@]}; do
28+
echo "$variable" >> $GITHUB_ENV
29+
done
30+
31+
- name: Checkout scripts
32+
uses: actions/checkout@v4
33+
with:
34+
token: ${{ secrets.SDK_BOT_ACCESS_TOKEN }}
35+
path: scripts
36+
repository: moengage/sdk-automation-scripts
37+
38+
- name: Setup dev environment
39+
uses: ./scripts/actions/ios-action-setup
40+
env:
41+
SDK_BOT_ACCESS_TOKEN: ${{ secrets.SDK_BOT_ACCESS_TOKEN }}
42+
43+
- name: Checkout source repository
44+
uses: actions/checkout@v4
45+
with:
46+
token: ${{ secrets.SDK_BOT_ACCESS_TOKEN }}
47+
path: source
48+
49+
- name: Build and Run tests
50+
working-directory: ./source
51+
run: pod lib lint --allow-warnings --skip-import-validation
52+
53+
swift-package:
54+
name: Build and run tests for Swift Package Manager
55+
runs-on: macos-15
56+
57+
steps:
58+
- name: Set custom environment variables
59+
if: github.event_name == 'workflow_dispatch'
60+
run: |
61+
VARIABLES=(${{ inputs.environment_variables }})
62+
for variable in ${VARIABLES[@]}; do
63+
echo "$variable" >> $GITHUB_ENV
64+
done
65+
66+
- name: Checkout scripts
67+
uses: actions/checkout@v4
68+
with:
69+
token: ${{ secrets.SDK_BOT_ACCESS_TOKEN }}
70+
path: scripts
71+
repository: moengage/sdk-automation-scripts
72+
73+
- name: Setup dev environment
74+
uses: ./scripts/actions/ios-action-setup
75+
env:
76+
SDK_BOT_ACCESS_TOKEN: ${{ secrets.SDK_BOT_ACCESS_TOKEN }}
77+
78+
- name: Checkout source repository
79+
uses: actions/checkout@v4
80+
with:
81+
token: ${{ secrets.SDK_BOT_ACCESS_TOKEN }}
82+
path: source
83+
84+
- name: Validate CHANGELOG
85+
run: ${{ github.workspace }}/scripts/scripts/release/ios/validate_changelog.rb
86+
working-directory: ./source
87+
88+
- name: Build and Run tests
89+
run: ${{ github.workspace }}/scripts/scripts/release/ios/build_swift_package.rb
90+
working-directory: ./source

.gitignore

Lines changed: 58 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,15 @@
1-
# OS X
2-
.DS_Store
3-
41
# Xcode
52
#
63
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
74

8-
## User settings
9-
xcuserdata/
10-
11-
## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
12-
*.xcscmblueprint
13-
*.xccheckout
5+
.DS_Store
6+
Thumbs.db
147

15-
## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
8+
## Build generated
169
build/
1710
DerivedData/
18-
*.moved-aside
11+
12+
## Various settings
1913
*.pbxuser
2014
!default.pbxuser
2115
*.mode1v3
@@ -24,23 +18,48 @@ DerivedData/
2418
!default.mode2v3
2519
*.perspectivev3
2620
!default.perspectivev3
21+
xcuserdata/
22+
*.xcuserstate
2723

28-
## Obj-C/Swift specific
29-
*.hmap
24+
*.xcodeproj/project.xcworkspace/xcuserdata
25+
*.xcodeproj/project.xcworkspace/xcshareddata
3026

31-
## App packaging
32-
*.ipa
33-
*.dSYM.zip
34-
*.dSYM
27+
## Other
28+
*.moved-aside
29+
*.xccheckout
30+
*.xcscmblueprint
31+
32+
33+
# Obj-C/Swift specific
34+
#
35+
# *.hmap
36+
# *.ipa
37+
# *.dSYM.zip
38+
# *.dSYM
39+
40+
## Playgrounds
41+
timeline.xctimeline
42+
playground.xcworkspace
43+
44+
# Swift Package Manager
45+
#
46+
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
47+
.swiftpm
48+
Packages/
49+
Package.pins
50+
Package.resolved
51+
.build/
3552

3653
# CocoaPods
3754
#
3855
# We recommend against adding the Pods directory to your .gitignore. However
3956
# you should judge for yourself, the pros and cons are mentioned at:
4057
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
4158
#
59+
4260
Pods/
4361
Podfile.lock
62+
4463
#
4564
# Add this line if you want to avoid checking in source code from the Xcode workspace
4665
# *.xcworkspace
@@ -50,12 +69,16 @@ Podfile.lock
5069
# Add this line if you want to avoid checking in source code from Carthage dependencies.
5170
# Carthage/Checkouts
5271

53-
Carthage/Build/
72+
# Carthage/Build
73+
74+
# Accio dependency management
75+
Dependencies/
76+
.accio/
5477

5578
# fastlane
5679
#
57-
# It is recommended to not store the screenshots in the git repo.
58-
# Instead, use fastlane to re-generate the screenshots whenever they are needed.
80+
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
81+
# screenshots whenever they are needed.
5982
# For more information about the recommended setup visit:
6083
# https://docs.fastlane.tools/best-practices/source-control/#source-control
6184

@@ -69,4 +92,18 @@ fastlane/test_output
6992
# After new code Injection tools there's a generated folder /iOSInjectionProject
7093
# https://github.com/johnno1962/injectionforxcode
7194

72-
iOSInjectionProject/
95+
# iOSInjectionProject/
96+
97+
# Binary files
98+
XCFramework/
99+
XCArchive/
100+
*.xcarchive
101+
*.xcframework
102+
*.zip
103+
*.ipa
104+
105+
# API doc
106+
apidoc/
107+
108+
# Code coverage
109+
coverage/

.travis.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# Release Date
2+
3+
## Release Version
4+
5+
- [minor] Added Swift Package Manager distribution support
6+
17
# 17-10-2025
28

39
## 6.6.1

0 commit comments

Comments
 (0)