Skip to content

CocoaPods publish job is being skipped #91

@sameerank

Description

@sameerank

Description

The CocoaPods publish step in the Release Please workflow is being skipped after releases are created. This has resulted in a mismatch in the latest published versions between SPM and CocoaPods.

Current State

  • Latest GitHub Release/SPM Version: 0.5.0
  • Latest Published CocoaPods Version: 0.3.0
$ bundle exec pod trunk info OpenFeature
OpenFeature
    - Versions:
      - 0.3.0 (2024-05-23 16:00:30 UTC)
    - Owners:
      - OpenFeature <[email protected]>

The Cause

The current implementation might be incorrect:

outputs:
release_created: ${{ steps.release.outputs['OpenFeature--release_created'] }}
# Version doesn't include `v` as a prefix. This is undocumented
version: ${{ steps.release.outputs['OpenFeature--version'] }}
upload_url: ${{ steps.release.outputs['OpenFeature--upload_url'] }}

Proposed Fix

outputs:
  release_created: ${{ steps.release.outputs.release_created }}
  version: ${{ steps.release.outputs.version }}
  upload_url: ${{ steps.release.outputs.upload_url }}

Commands Used to Investigate

https://github.com/open-feature/swift-sdk/actions/runs/19297891762

gh run view 19297891762 -R open-feature/swift-sdk # View details of the release 0.5.0 workflow run
gh run view --job=55184361046 -R open-feature/swift-sdk # View details of the skipped cocoapods job
gh run view --job=55184339250 --log -R open-feature/swift-sdk | grep -A20 -B20 "release_created" # Check release-please job output for release_created variable

The CocoaPods job shows as "-" which indicates it was skipped.

✓ main Run Release Please · 19297891762
Triggered via push about 19 days ago

JOBS
✓ release-please in 12s (ID 55184339250)
- cocoapods in 0s (ID 55184361046)

Contents of steps.release.outputs

The logs show that the contents:

{
  "releases_created": "true",
  "release_created": "true",
  "id": "167739650",
  "name": "v0.5.0",
  "tag_name": "0.5.0",
  "sha": "d71686219a65ab78f77923ceb0e2ea549e1e50ef",
  "body": "[truncated for brevity]",
  "html_url": "https://github.com/open-feature/swift-sdk/releases/tag/0.5.0",
  "draft": "false",
  "upload_url": "https://uploads.github.com/repos/open-feature/swift-sdk/releases/167739650/assets{?name,label}",
  "path": ".",
  "version": "0.5.0",
  "major": "0",
  "minor": "5",
  "patch": "0",
  "paths_released": "[\".\"]"
}

Why the CocoaPods job is skipped

The CocoaPods job has this condition:

if: ${{ fromJSON(needs.release-please.outputs.release_created || false) }}

Since steps.release.outputs['OpenFeature--release_created'] doesn't exist in the actual outputs, it evaluates to null. This causes needs.release-please.outputs.release_created to be falsy and skips the job.

Impact

  • Users installing via CocoaPods are stuck on version 0.3.0. They're missing new features and fixes.
  • The podspec file shows version 0.5.0, but this version is not available via pod install

Additional notes

The formatting assumed in release-please.yaml may not have worked because of the release type that was specified.

"release-type": "simple",

And so an alternative fix might be changing the release type to use namespaced outputs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions