-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #846 from Mantle/cocoapods
Make Cocoapods support official & set-up auto-deploy from tag push via GitHub Actions
- Loading branch information
Showing
2 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: cocoapods-publish | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
build: | ||
runs-on: macos-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Updating submodules | ||
run: git submodule update --init --recursive | ||
- name: Get the version from tag | ||
id: get_version | ||
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | ||
- name: Publish to Cocoapods | ||
env: | ||
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} | ||
MANTLE_VERSION: ${{ steps.get_version.outputs.VERSION }} | ||
run: | | ||
mkdir -p tmp | ||
# Modify the podspec with the version & tag and run lint on it | ||
jq --arg VERSION "$MANTLE_VERSION" '. | .version |= $VERSION | .source.tag |= $VERSION' Mantle.podspec.json > tmp/Mantle.podspec.json | ||
pod spec lint tmp/Mantle.podspec.json --skip-import-validation --allow-warnings | ||
# Print out the podspec we'll submit | ||
cat tmp/Mantle.podspec.json | ||
# Time to ship! | ||
pod trunk push tmp/Mantle.podspec.json --skip-import-validation --allow-warnings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"name": "Mantle", | ||
"summary": "Model framework for Cocoa and Cocoa Touch.", | ||
"homepage": "https://github.com/Mantle/Mantle", | ||
"license": "MIT", | ||
"authors": { | ||
"Robert Böhnke": "[email protected]", | ||
"David Caunt": "[email protected]", | ||
"Jan Gorman": "[email protected]" | ||
}, | ||
"source": { | ||
"git": "https://github.com/Mantle/Mantle.git" | ||
}, | ||
"platforms": { | ||
"ios": "5.0", | ||
"osx": "10.7", | ||
"watchos": "2.0", | ||
"tvos": "9.0" | ||
}, | ||
"requires_arc": true, | ||
"frameworks": "Foundation", | ||
"source_files": "Mantle", | ||
"subspecs": [ | ||
{ | ||
"name": "extobjc", | ||
"source_files": "Mantle/extobjc", | ||
"private_header_files": "Mantle/extobjc/*.h" | ||
} | ||
] | ||
} |