diff --git a/.github/workflows/cocoapods-keepalive.yml b/.github/workflows/cocoapods-keepalive.yml new file mode 100644 index 0000000..21c0696 --- /dev/null +++ b/.github/workflows/cocoapods-keepalive.yml @@ -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