Skip to content

Commit

Permalink
feat: create cicd workflow (#3)
Browse files Browse the repository at this point in the history
* feat: create cicd workflow
  • Loading branch information
wzxha authored Dec 8, 2023
1 parent e9d1430 commit a2e1587
Show file tree
Hide file tree
Showing 18 changed files with 1,581 additions and 16 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: AliyunpanSDK CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
iOS:
name: ${{ matrix.name }}
runs-on: ${{ matrix.runsOn }}
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
include:
- destination: "OS=17.0.1,name=iPhone 14 Pro"
name: "iOS 17.0"
runsOn: macOS-13
- destination: "OS=16.4,name=iPhone 14 Pro"
name: "iOS 16.4"
runsOn: macOS-13
steps:
- uses: actions/checkout@v4
- name: Install xcpretty
run: gem install xcpretty
- name: ${{ matrix.name }}
run: set -o pipefail && xcodebuild clean test -project AliyunpanSDK.xcodeproj -scheme AliyunpanSDK -sdk iphonesimulator -destination "${{ matrix.destination }}" | xcpretty
26 changes: 26 additions & 0 deletions .github/workflows/deploy_to_cocoapods.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: deploy_to_cocoapods

on:
push:
tags:
- '*'

jobs:
build:

runs-on: macOS-latest

steps:
- uses: actions/checkout@v1

- name: Install Cocoapods
run: gem install cocoapods

- name: Deploy to Cocoapods
run: |
set -eo pipefail
export LIB_VERSION=$(git describe --tags `git rev-list --tags --max-count=1`)
pod lib lint --allow-warnings
pod trunk push --allow-warnings
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ iOSInjectionProject/
### SwiftPM ###
Packages
xcuserdata
*.xcodeproj
# *.xcodeproj
.swiftpm

# End of https://www.toptal.com/developers/gitignore/api/cocoapods,swift,swiftpm,macos
Expand Down
4 changes: 2 additions & 2 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ disabled_rules: # rule identifiers to exclude from running
- unused_setter_value
- no_space_in_method_call
- inclusive_language
included: # paths to include during linting. `--path` is ignored if present. takes precendence over `excluded`.
included:
- Sources
excluded: # paths to ignore during linting. overridden by `included`.
- Tests
type_name:
min_length: 2 # only warning
max_length: # warning and error
Expand Down
2 changes: 1 addition & 1 deletion AliyunpanSDK.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = "AliyunpanSDK"
spec.version = "0.1.2"
spec.version = ENV['LIB_VERSION'] || "1.0"
spec.summary = "Aliyunpan OpenSDK-iOS"

spec.description = <<-DESC
Expand Down
861 changes: 861 additions & 0 deletions AliyunpanSDK.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F4C6F2252B060C4B003A06B3"
BuildableName = "AliyunpanSDK.framework"
BlueprintName = "AliyunpanSDK"
ReferencedContainer = "container:AliyunpanSDK.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<TestPlans>
<TestPlanReference
reference = "container:Tests/AliyunpanSDK.xctestplan"
default = "YES">
</TestPlanReference>
</TestPlans>
<Testables>
<TestableReference
skipped = "NO"
parallelizable = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F4C6F22F2B060C4B003A06B3"
BuildableName = "AliyunpanSDKTests.xctest"
BlueprintName = "AliyunpanSDKTests"
ReferencedContainer = "container:AliyunpanSDK.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F4C6F2252B060C4B003A06B3"
BuildableName = "AliyunpanSDK.framework"
BlueprintName = "AliyunpanSDK"
ReferencedContainer = "container:AliyunpanSDK.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Loading

0 comments on commit a2e1587

Please sign in to comment.