From 9e70726848ec07979fbb74b3ed1823b1b680ecb9 Mon Sep 17 00:00:00 2001 From: Daniel Jilg Date: Thu, 11 Jan 2024 10:18:11 +0100 Subject: [PATCH] Add GH Action --- .github/workflows/cocoapods.yaml | 25 +++++++++++++++++++++++++ TelemetryDeckSDK.podspec | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/cocoapods.yaml 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."