forked from adobe/aepsdk-rulesengine-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
354c1a4
commit e9fafe1
Showing
8 changed files
with
234 additions
and
30 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
template: | | ||
## What’s Changed | ||
$CHANGES |
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Release | ||
|
||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: 'tag/version' | ||
required: true | ||
default: '1.0.0' | ||
|
||
jobs: | ||
release_rules_engine: | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: main | ||
|
||
- name: Check version in Podspec | ||
run: | | ||
set -eo pipefail | ||
echo Target version: ${{ github.event.inputs.tag }} | ||
make check-version VERSION=${{ github.event.inputs.tag }} | ||
# "release-drafter" action docs -> https://github.com/marketplace/actions/release-drafter | ||
- name: SPM integration test | ||
run: | | ||
set -eo pipefail | ||
echo SPM integration test starts: | ||
make test-SPM-integration | ||
- name: podspec file verification | ||
run: | | ||
set -eo pipefail | ||
echo podspec file verification starts: | ||
make test-podspec | ||
- uses: release-drafter/release-drafter@v5 | ||
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: Publish Pods | ||
run: | | ||
set -eo pipefail | ||
gem install cocoapods | ||
pod lib lint --allow-warnings | ||
# pod trunk push SwiftRulesEngineTest.podspec --allow-warnings | ||
env: | ||
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} | ||
|
||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
#!/bin/bash | ||
|
||
set -e # Any subsequent(*) commands which fail will cause the shell script to exit immediately | ||
|
||
PROJECT_NAME=TestProject | ||
|
||
# Clean up. | ||
rm -rf $PROJECT_NAME | ||
|
||
mkdir -p $PROJECT_NAME && cd $PROJECT_NAME | ||
|
||
# Create the package. | ||
swift package init | ||
|
||
# Create the Package.swift. | ||
echo "// swift-tools-version:5.3 | ||
// The swift-tools-version declares the minimum version of Swift required to build this package. | ||
import PackageDescription | ||
let package = Package( | ||
name: \"TestProject\", | ||
defaultLocalization: \"en-US\", | ||
platforms: [ | ||
.iOS(.v10) | ||
], | ||
products: [ | ||
.library( | ||
name: \"TestProject\", | ||
targets: [\"TestProject\"] | ||
) | ||
], | ||
dependencies: [ | ||
.package(name: \"AEPRulesEngine\", path: \"../\"), | ||
], | ||
targets: [ | ||
.target( | ||
name: \"TestProject\", | ||
dependencies: [ | ||
.product(name: \"AEPRulesEngine\", package: \"AEPRulesEngine\")]) | ||
] | ||
) | ||
" >Package.swift | ||
|
||
swift package update | ||
|
||
# Archive for generic iOS device | ||
echo '############# Archive for generic iOS device ###############' | ||
xcodebuild archive -scheme TestProject -destination 'generic/platform=iOS' | ||
|
||
# Build for generic iOS device | ||
echo '############# Build for generic iOS device ###############' | ||
xcodebuild build -scheme TestProject -destination 'generic/platform=iOS' | ||
|
||
# Build for i386 simulator | ||
echo '############# Build for i386 simulator ###############' | ||
xcodebuild build -scheme TestProject -destination 'generic/platform=iOS Simulator' ARCHS=i386 | ||
|
||
# Build for x86_64 simulator | ||
echo '############# Build for x86_64 simulator ###############' | ||
xcodebuild build -scheme TestProject -destination 'generic/platform=iOS Simulator' ARCHS=x86_64 | ||
|
||
# Clean up. | ||
cd ../ | ||
rm -rf $PROJECT_NAME |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/bin/bash | ||
|
||
set -e # Any subsequent(*) commands which fail will cause the shell script to exit immediately | ||
|
||
PROJECT_NAME=TestProject | ||
|
||
# Clean up. | ||
rm -rf $PROJECT_NAME | ||
|
||
mkdir -p $PROJECT_NAME && cd $PROJECT_NAME | ||
|
||
# Create a new Xcode project. | ||
swift package init | ||
swift package generate-xcodeproj | ||
|
||
# Create a Podfile with our pod as dependency. | ||
echo " | ||
platform :ios, '10.0' | ||
target '$PROJECT_NAME' do | ||
use_frameworks! | ||
pod 'AEPRulesEngine', :path => '../' | ||
end | ||
" >>Podfile | ||
|
||
# Install the pods. | ||
pod install | ||
|
||
# Archive for generic iOS device | ||
echo '############# Archive for generic iOS device ###############' | ||
xcodebuild archive -scheme TestProject-Package -workspace TestProject.xcworkspace -destination 'generic/platform=iOS' | ||
|
||
# Build for generic iOS device | ||
echo '############# Build for generic iOS device ###############' | ||
xcodebuild clean build -scheme TestProject-Package -workspace TestProject.xcworkspace -destination 'generic/platform=iOS' | ||
|
||
# Archive for x86_64 simulator | ||
echo '############# Archive for simulator ###############' | ||
xcodebuild archive -scheme TestProject-Package -workspace TestProject.xcworkspace -destination 'generic/platform=iOS Simulator' | ||
|
||
# Build for x86_64 simulator | ||
echo '############# Build for simulator ###############' | ||
xcodebuild clean build -scheme TestProject-Package -workspace TestProject.xcworkspace -destination 'generic/platform=iOS Simulator' | ||
|
||
# Clean up. | ||
cd ../ | ||
rm -rf $PROJECT_NAME |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
if which jq >/dev/null; then | ||
echo "jq is installed" | ||
else | ||
echo "error: jq not installed.(brew install jq)" | ||
fi | ||
|
||
NC='\033[0m' | ||
RED='\033[0;31m' | ||
GREEN='\033[0;32m' | ||
BLUE='\033[0;34m' | ||
|
||
# ---- enable the following code after the new pod has been released. ---- | ||
# LATEST_PUBLIC_VERSION=$(pod spec cat AEPRulesEngine | jq '.version' | tr -d '"') | ||
# echo "Latest public version is: ${BLUE}$LATEST_PUBLIC_VERSION${NC}" | ||
# if [[ "$1" == "$LATEST_PUBLIC_VERSION" ]]; then | ||
# echo "${RED}[Error]${NC} $LATEST_PUBLIC_VERSION has been released!" | ||
# exit -1 | ||
# fi | ||
|
||
echo "Start to check the version in podspec file >" | ||
echo "Target version - ${BLUE}$1${NC}" | ||
# PODSPEC_VERSION=$(cat ./SwiftRulesEngineTest.podspec | egrep '^\s*s.version\s*=\s*\"(.*)\"' | ruby -e "puts gets.scan(/^\s*s.version\s*=\s*\"(.*)\"/)[0] ") | ||
PODSPEC_VERSION=$(pod ipc spec AEPRulesEngine.podspec | jq '.version' | tr -d '"') | ||
echo "Local podspec version - ${BLUE}${PODSPEC_VERSION}${NC}" | ||
if [[ "$1" == "$PODSPEC_VERSION" ]]; then | ||
echo "${GREEN}Pass!" | ||
exit 0 | ||
else | ||
echo "${RED}[Error]${NC} Version do not match!" | ||
exit -1 | ||
fi |