Skip to the content.

Table of Contents

Auto Push to CocoaPod Trunk

Get Token

Register a new token account

pod trunk register your@email.com -- description "GitHub Actions Token"

Once you confirm email verification you can obtain it from private files. ~/.netrc or use following command:

grep -A2 'trunk.cocoapods.org' ~/.netrc

Set Secret in Github Repository

Copy the token you’ve got and go Settings->Secrets of your repo. Add token to Repository secrets with COCOAPODS_TRUNK_TOKEN (can be other name paired with action env)

Setup Github Action

this is an example:

name: Auto Push Trunk

on:
  release:
    types:
      - created

jobs:
  validation:
    name: Upload pods to Specs
    runs-on: macos-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: push trunk
        env:
          COCOAPODS_TRUNK_TOKEN: $
        run: |
          pod trunk push
          pod trunk me clean-sessions --all

Enjoy it🎉.

Trigger Action

Just modify on section.

Documents is here.