Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问clear审计通过

cocoapods-publishing-workflowcocoapods 发布工作流程

Agent Skill

cocoapods-publishing-workflow 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

490

周安装

20

GitHub Stars

142

下载量

157
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:cocoapods-publishing-workflow(cocoapods 发布工作流程)
来源仓库:https://github.com/thebushidocollective/han
仓库路径:skills/cocoapods-publishing-workflow
安装命令:
npx skills add https://github.com/thebushidocollective/han --skill cocoapods-publishing-workflow
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/thebushidocollective/han --skill cocoapods-publishing-workflow

简介

cocoapods-publishing-workflow 提供从注册到发布的完整 CocoaPods 库上架流程指导,确保合规与可发现性。

  • 适用于希望将私有或公有组件托管至 Trunk 的开发者。
  • 流程包括邮箱注册、本地校验、标签管理与正式推送四个阶段。
  • 需确保网络连通性与邮箱有效性,避免因验证失败中断流程。
  • 推荐结合 CI 系统实现自动化校验,提升发布效率与稳定性。

SKILL.md

CocoaPods - Publishing Workflow

Complete guide to publishing your CocoaPods library to the official CocoaPods Trunk.

Publishing Overview

Process Steps

  1. Register with CocoaPods Trunk (one-time)
  2. Prepare your podspec
  3. Validate locally (pod lib lint)
  4. Validate for publishing (pod spec lint)
  5. Tag version in git
  6. Push to Trunk (pod trunk push)

Trunk Registration

Register Email (One-Time)

# Register your email
pod trunk register email@example.com 'Your Name'

# Verify email (check inbox for verification link)
# Click link in email to activate account

Check Registration

# Verify registration
pod trunk me

# Sample output:
# - Name:     Your Name
# - Email:    email@example.com
# - Since:    January 1st, 2024
# - Pods:     None

Podspec Preparation

Version Management

Pod::Spec.new do |spec|
  # Semantic versioning: MAJOR.MINOR.PATCH
  spec.version = '1.0.0'

  # Must match git tag
  spec.source = {
    :git => 'https://github.com/username/MyLibrary.git',
    :tag => spec.version.to_s
  }
end

Required Metadata

Pod::Spec.new do |spec|
  # Identity (required)
  spec.name         = 'MyLibrary'
  spec.version      = '1.0.0'

  # Description (required)
  spec.summary      = 'Brief one-line description'
  spec.description  = 'Longer description with more details about what the library does'

  # Links (required)
  spec.homepage     = 'https://github.com/username/MyLibrary'
  spec.source       = { :git => 'https://github.com/username/MyLibrary.git', :tag => spec.version.to_s }

  # License (required)
  spec.license      = { :type => 'MIT', :file => 'LICENSE' }

  # Authors (required)
  spec.authors      = { 'Your Name' => 'email@example.com' }

  # Platform (required)
  spec.ios.deployment_target = '13.0'
end

Local Validation

Quick Validation

# Fast validation (skips build)
pod lib lint --quick

# Check for common issues without full build

Full Validation

# Complete validation with build
pod lib lint

# With Swift version
pod lib lint --swift-version=5.9

# Verbose output
pod lib lint --verbose

Handle Warnings

# Allow warnings (not recommended for new pods)
pod lib lint --allow-warnings

# Better: Fix warnings
pod lib lint
# Address each warning individually

Publishing Validation

Spec Lint

# Validate podspec for publishing
pod spec lint

# Validates against remote repository
# Simulates real-world installation

Pre-Publishing Checklist

  • All tests pass
  • No lint warnings
  • Privacy manifest included (iOS 17+)
  • README is complete
  • LICENSE file exists
  • CHANGELOG updated
  • Version number is correct
  • Git repository is clean

Git Tagging

Create Tag

# Stage all changes
git add .

# Commit changes
git commit -m "Release version 1.0.0"

# Create tag matching podspec version
git tag 1.0.0

# Push to remote with tags
git push origin main --tags

Tag Format

# Semantic versioning
git tag 1.0.0      # MAJOR.MINOR.PATCH
git tag 1.0.0-beta.1  # Pre-release
git tag 1.0.0-rc.1    # Release candidate

# Must match spec.version in podspec

Publishing to Trunk

Push Pod

# Push to CocoaPods Trunk
pod trunk push MyLibrary.podspec

# With specific Swift version
pod trunk push MyLibrary.podspec --swift-version=5.9

# Allow warnings (not recommended)
pod trunk push MyLibrary.podspec --allow-warnings

Successful Publish Output

Validating podspec
 -> MyLibrary (1.0.0)

Updating spec repo `trunk`
 -> MyLibrary (1.0.0)

--------------------------------------------------------------------------------
 🎉  Congrats

 🚀  MyLibrary (1.0.0) successfully published
 📅  January 1st, 2024
 🌎  https://cocoapods.org/pods/MyLibrary
 👍  Tell your friends!
--------------------------------------------------------------------------------

Version Updates

Patch Release (Bug Fixes)

# In podspec
spec.version = '1.0.1'  # Was 1.0.0
# Git workflow
git add .
git commit -m "Fix: Resolve crash in background mode"
git tag 1.0.1
git push origin main --tags
pod trunk push MyLibrary.podspec

Minor Release (New Features)

# In podspec
spec.version = '1.1.0'  # Was 1.0.1
# Git workflow
git add .
git commit -m "Add: Support for custom themes"
git tag 1.1.0
git push origin main --tags
pod trunk push MyLibrary.podspec

Major Release (Breaking Changes)

# In podspec
spec.version = '2.0.0'  # Was 1.1.0
# Git workflow
git add .
git commit -m "BREAKING: Refactor API for modern Swift"
git tag 2.0.0
git push origin main --tags
pod trunk push MyLibrary.podspec

Managing Multiple Pods

List Your Pods

# View all your published pods
pod trunk me

# Shows:
# - Pods:
#   - MyLibrary
#   - MyOtherLibrary

Add Contributors

# Add team member to pod
pod trunk add-owner MyLibrary email@example.com

# Remove contributor
pod trunk remove-owner MyLibrary email@example.com

Deprecation

Deprecate Old Version

# Deprecate specific version
pod trunk deprecate MyLibrary --version=1.0.0

# Deprecate entire pod
pod trunk deprecate MyLibrary

Deprecation with Replacement

# In podspec
spec.deprecated = true
spec.deprecated_in_favor_of = 'NewAwesomeLibrary'

Common Issues

Issue: Tag Doesn't Match

ERROR | [MyLibrary] The repo has no tag for version 1.0.0

Solution:

# Create and push tag
git tag 1.0.0
git push origin --tags

Issue: Validation Fails

ERROR | [MyLibrary] xcodebuild: Returned an unsuccessful exit code

Solution:

# Run detailed validation
pod lib lint --verbose

# Fix errors shown in output
# Re-validate until clean

Issue: Missing License

ERROR | [MyLibrary] Missing required attribute `license`

Solution:

# Add to podspec
spec.license = { :type => 'MIT', :file => 'LICENSE' }
# Create LICENSE file in repo root

Best Practices

Pre-Publish Testing

# 1. Test in example app
cd Example
pod install
# Run app, verify functionality

# 2. Test in real project
# Create test project, add pod from local path
pod 'MyLibrary', :path => '../MyLibrary'

# 3. Validate
pod lib lint
pod spec lint

Version Numbering

# Follow semantic versioning strictly
spec.version = '1.0.0'  # Initial release
spec.version = '1.0.1'  # Bug fix
spec.version = '1.1.0'  # New feature
spec.version = '2.0.0'  # Breaking change

CHANGELOG

# Changelog

## [1.1.0] - 2024-01-15
### Added
- Custom theme support
- Dark mode compatibility

### Fixed
- Memory leak in background processing

## [1.0.0] - 2024-01-01
- Initial release

README

# MyLibrary

Brief description of library.

## Installation

\`\`\`ruby
pod 'MyLibrary', '~> 1.0'
\`\`\`

## Usage

\`\`\`swift
import MyLibrary

let library = MyLibrary()
library.doSomething()
\`\`\`

## Requirements

- iOS 13.0+
- Swift 5.7+

## License

MyLibrary is available under the MIT license.

Anti-Patterns

Don't

❌ Publish without testing

pod trunk push --skip-tests  # Risky

❌ Use --allow-warnings for initial release

pod trunk push --allow-warnings  # Fix warnings instead

❌ Forget to tag git

# Missing git tag - publish will fail
pod trunk push

❌ Skip version bump

# Still version 1.0.0 after changes - confusing
spec.version = '1.0.0'

Do

✅ Test thoroughly before publishing

pod lib lint
pod spec lint
# Test in real project

✅ Fix all warnings

pod lib lint
# Address warnings

✅ Always tag git

git tag 1.0.0
git push --tags

✅ Bump version for every release

spec.version = '1.0.1'  # Incremented

Complete Publishing Example

# 1. Prepare podspec
vim MyLibrary.podspec
# Update version to 1.0.0

# 2. Update CHANGELOG
vim CHANGELOG.md
# Document changes

# 3. Commit and tag
git add .
git commit -m "Release 1.0.0: Initial public release"
git tag 1.0.0
git push origin main --tags

# 4. Validate locally
pod lib lint

# 5. Validate for publishing
pod spec lint

# 6. Publish
pod trunk push MyLibrary.podspec

# 7. Verify
pod search MyLibrary
# Should show your new pod

Related Skills

  • cocoapods-podspec-fundamentals
  • cocoapods-subspecs-organization
  • cocoapods-test-specs
  • cocoapods-privacy-manifests

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

28.56%
按下载量换算45

Codex

19.8%
按下载量换算31

OpenCode

17.26%
按下载量换算27

Antigravity

13.12%
按下载量换算21

windsurf

7.05%
按下载量换算11

Gemini CLI

3.01%
按下载量换算5

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills