diff --git a/.github/workflows/cocoapods.yaml b/.github/workflows/cocoapods.yaml new file mode 100644 index 0000000..cccb3df --- /dev/null +++ b/.github/workflows/cocoapods.yaml @@ -0,0 +1,25 @@ +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 }} diff --git a/TelemetryDeckSDK.podspec b/TelemetryDeckSDK.podspec index 4fa2c81..8705ca0 100644 --- a/TelemetryDeckSDK.podspec +++ b/TelemetryDeckSDK.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = "TelemetryDeckSDK" - spec.version = "1.5.0" + spec.version = ENV['LIB_VERSION'] || '1.5.0' #fallback to major version spec.summary = "Client SDK for TelemetryDeck" spec.swift_versions = "5.2" spec.summary = "Swift SDK for TelemetryDeck, a privacy-first analytics service for apps. Sign up for a free account at telemetrydeck.com."