Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/actions/publish-observability/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: "Publish LaunchDarklyObservability"
description: "Publish LaunchDarklyObservability.podspec to CocoaPods trunk"

inputs:
dry_run:
description: "Is this a dry run. If so no package will be published."
required: true

runs:
using: composite
steps:
- name: Push LaunchDarklyObservability to CocoaPods
if: ${{ inputs.dry_run == 'false' }}
shell: bash
run: pod trunk push LaunchDarklyObservability.podspec --allow-warnings --verbose
15 changes: 15 additions & 0 deletions .github/actions/publish-session-replay/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: "Publish LaunchDarklySessionReplay"
description: "Publish LaunchDarklySessionReplay.podspec to CocoaPods trunk"

inputs:
dry_run:
description: "Is this a dry run. If so no package will be published."
required: true

runs:
using: composite
steps:
- name: Push LaunchDarklySessionReplay to CocoaPods
if: ${{ inputs.dry_run == 'false' }}
shell: bash
run: pod trunk push LaunchDarklySessionReplay.podspec --allow-warnings --verbose
43 changes: 43 additions & 0 deletions .github/workflows/manual-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Manual Publish

on:
workflow_dispatch:
inputs:
package:
description: "Which package to publish"
type: choice
required: true
options:
- LaunchDarklyObservability
- LaunchDarklySessionReplay
dry_run:
description: "Is this a dry run. If so no package will be published."
type: boolean
required: true

jobs:
publish:
runs-on: macos-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4

- name: Get CocoaPods token
uses: launchdarkly/gh-actions/actions/release-secrets@release-secrets-v1.2.0
with:
aws_assume_role: ${{ vars.AWS_ROLE_ARN }}
ssm_parameter_pairs: '/production/common/releasing/cocoapods/token = COCOAPODS_TRUNK_TOKEN'

- name: Publish LaunchDarklyObservability
uses: ./.github/actions/publish-observability
if: ${{ inputs.package == 'LaunchDarklyObservability' }}
with:
dry_run: ${{ inputs.dry_run }}

- name: Publish LaunchDarklySessionReplay
uses: ./.github/actions/publish-session-replay
if: ${{ inputs.package == 'LaunchDarklySessionReplay' }}
with:
dry_run: ${{ inputs.dry_run }}
24 changes: 22 additions & 2 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
release-package:
runs-on: ubuntu-latest
runs-on: macos-latest
permissions:
id-token: write
contents: write # Contents and pull-requests are for release-please to make releases.
Expand All @@ -20,6 +20,7 @@ jobs:
with:
aws_assume_role: ${{ vars.AWS_ROLE_ARN }}
ssm_parameter_pairs: '/production/common/releasing/o11y_gh_pat = GITHUB_PAT'

- uses: googleapis/release-please-action@a02a34c4d625f9be7cb89156071d8567266a2445
id: release
with:
Expand All @@ -28,4 +29,23 @@ jobs:
- uses: actions/checkout@v4
if: ${{ steps.release.outputs.releases_created == 'true' }}
with:
fetch-depth: 0 # If you only need the current version keep this.
fetch-depth: 0

- name: Get CocoaPods token
uses: launchdarkly/gh-actions/actions/release-secrets@release-secrets-v1.2.0
if: ${{ steps.release.outputs.releases_created == 'true' }}
with:
aws_assume_role: ${{ vars.AWS_ROLE_ARN }}
ssm_parameter_pairs: '/production/common/releasing/cocoapods/token = COCOAPODS_TRUNK_TOKEN'

- name: Publish LaunchDarklyObservability
uses: ./.github/actions/publish-observability
if: ${{ steps.release.outputs['.--release_created'] == 'true' }}
with:
dry_run: 'false'

- name: Publish LaunchDarklySessionReplay
uses: ./.github/actions/publish-session-replay
if: ${{ steps.release.outputs['Sources/LaunchDarklySessionReplay--release_created'] == 'true' }}
with:
dry_run: 'false'
3 changes: 2 additions & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
".": "0.26.1"
".": "0.26.1",
"Sources/LaunchDarklySessionReplay": "0.26.1"
}
12 changes: 10 additions & 2 deletions release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,21 @@
"include-v-in-tag": false,
"packages": {
".": {
"package-name": "swift-launchdarkly-observability",
"package-name": "LaunchDarklyObservability",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tag collisions from disabled component-in-tag with multiple packages

Medium Severity

With include-component-in-tag: false and include-v-in-tag: false, both packages produce bare version tags (e.g., 0.27.0). Adding the second Sources/LaunchDarklySessionReplay package means both packages will generate identical tag names when at the same version, causing tag collisions in Git. The podspecs also reference :tag => s.version.to_s, so CocoaPods source resolution depends on correct, distinct tags per package. One of these settings likely needs to be true now that there are two independently versioned packages.

Additional Locations (1)
Fix in Cursor Fix in Web

"release-type": "simple",
"versioning": "default",
"bump-minor-pre-major": true,
"extra-files": [
"Sources/LaunchDarklyObservability/Version.swift",
"LaunchDarklyObservability.podspec",
"LaunchDarklyObservability.podspec"
]
},
"Sources/LaunchDarklySessionReplay": {
"package-name": "LaunchDarklySessionReplay",
"release-type": "simple",
"versioning": "default",
"bump-minor-pre-major": true,
"extra-files": [
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SessionReplay podspec extra-files path resolves to wrong location

High Severity

In release-please, extra-files paths are relative to the package directory, not the repo root. The Sources/LaunchDarklySessionReplay package lists "LaunchDarklySessionReplay.podspec" as an extra file, so release-please will look for it at Sources/LaunchDarklySessionReplay/LaunchDarklySessionReplay.podspec, which doesn't exist. The actual podspec lives at the repo root. This was previously handled correctly when the podspec was listed in the root . package's extra-files. Now the podspec version won't be updated during SessionReplay releases, causing pod trunk push to publish a stale version.

Fix in Cursor Fix in Web

"LaunchDarklySessionReplay.podspec"
]
}
Expand Down
Loading