[#81] Push to CocoaPods Trunk on Release (#105)

* Introduced the `Release` GHA workflow
* Updated the `Common` workflow
This commit is contained in:
Yakov Manshin 2022-10-05 08:32:19 +02:00 committed by GitHub
parent 6658ee6812
commit 2207359d89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 1 deletions

View File

@ -4,6 +4,11 @@ on:
push:
branches:
- "main"
workflow_call:
inputs:
force_all_checks:
type: boolean
required: true
workflow_dispatch:
env:
XCODE_PATH: "/Applications/Xcode_14.0.1.app"
@ -44,7 +49,7 @@ jobs:
cocoapods_podspec_lint:
name: CocoaPods Podspec Linting
runs-on: macOS-12
if: ${{ github.event_name == 'pull_request' }}
if: ${{ inputs.force_all_checks || github.event_name == 'pull_request' }}
needs: [spm_tests_macos, spm_tests_linux]
steps:
- uses: actions/checkout@v3

24
.github/workflows/Release.yml vendored Normal file
View File

@ -0,0 +1,24 @@
name: Release
on:
release:
types: [published]
env:
XCODE_PATH: "/Applications/Xcode_14.0.1.app"
jobs:
run_common_checks:
uses: ./.github/workflows/Common.yml
with:
force_all_checks: true
cocoapods_trunk_push:
name: Push to CocoaPods Trunk
runs-on: macOS-12
needs: run_common_checks
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TOKEN }}
steps:
- uses: actions/checkout@v3
- name: Select Xcode Version
run: sudo xcode-select -switch ${{ env.XCODE_PATH }}
- name: Push
run: |
pod trunk push YMFF.podspec --verbose