Skip to content
Merged
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
28 changes: 28 additions & 0 deletions .github/workflows/cocoapods-keepalive.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "CocoaPods Token Keep-Alive"

on:
schedule:
# CocoaPods sessions currently expire after 3 days of inactivity (VALIDITY_LENGTH)
# This runs every day at midnight UTC to keep the current token alive
# See: https://github.com/CocoaPods/trunk.cocoapods.org/blob/a1869790e9ae2229b6985b6af4532da814202558/app/models/session.rb#L9
- cron: "0 0 * * *" # Runs every day at midnight UTC
workflow_dispatch:

permissions:
contents: read

jobs:
keepalive:
name: Refresh CocoaPods Session
runs-on: macos-15
environment: production
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}

steps:
- name: Install CocoaPods
run: gem install cocoapods
- name: Print CocoaPods Version
run: pod --version
- name: Refresh CocoaPods Session
run: pod trunk me > /dev/null 2>&1
Copy link
Member

Choose a reason for hiding this comment

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

So this is enough to keep it alive then?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, when you run it you see the expiration time increase