Skip to content

Commit

Permalink
auto set version for pod
Browse files Browse the repository at this point in the history
  • Loading branch information
ypopovych committed Aug 11, 2023
1 parent c80b0f8 commit e12448a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ jobs:
- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_14.0.app
- name: Publish Pod
run: pod trunk push --allow-warnings
run: |
sed -i '' "s|[[:blank:]]*s\.version[[:blank:]].*|s.version = '${VERSION}'|g" ContextCodable.swift.podspec
pod trunk push --allow-warnings
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}

VERSION: ${{ github.event.release.tag_name }}
23 changes: 10 additions & 13 deletions ContextCodable.swift.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'ContextCodable.swift'
s.version = '0.1.0'
s.version = '999.99.9'
s.summary = 'Backport of CodableWithConfiguration to old OS versions and Linux'

s.description = <<-DESC
Expand All @@ -13,19 +13,16 @@ Pod::Spec.new do |s|
s.author = { 'Tesseract Systems, Inc.' => 'info@tesseract.one' }
s.source = { :git => 'https://github.com/tesseract-one/ContextCodable.swift.git', :tag => s.version.to_s }

s.ios.deployment_target = '11.0'
s.osx.deployment_target = '10.12'
s.tvos.deployment_target = '11.0'
s.watchos.deployment_target = '4.0'

s.swift_version = '5.4'
s.swift_version = '5.4'
s.module_name = 'ContextCodable'

s.module_name = 'ContextCodable'

s.source_files = 'Sources/ContextCodable/**/*.swift'
base_platforms = { :ios => '11.0', :osx => '10.13', :tvos => '11.0' }
s.platforms = base_platforms.merge({ :watchos => '6.0' })

s.source_files = 'Sources/ContextCodable/**/*.swift'

s.test_spec 'Tests' do |test_spec|
test_spec.platforms = {:ios => '11.0', :osx => '10.12', :tvos => '11.0'}
test_spec.source_files = 'Tests/ContextCodableTests/*.swift'
s.test_spec 'Tests' do |ts|
ts.platforms = base_platforms
ts.source_files = 'Tests/ContextCodableTests/*.swift'
end
end
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import PackageDescription

let package = Package(
name: "ContextCodable",
platforms: [.macOS(.v10_10), .iOS(.v9), .tvOS(.v9), .watchOS(.v2)],
platforms: [.macOS(.v10_13), .iOS(.v11), .tvOS(.v11), .watchOS(.v6)],
products: [
.library(
name: "ContextCodable",
Expand Down

0 comments on commit e12448a

Please sign in to comment.