-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MOB-913 Creating manual Deployment Workflow (#104)
- Created manual deployment process and injection of Pusher Key to Plist - Deployment to cocoapods
- Loading branch information
1 parent
c52ede1
commit 6df9a4c
Showing
2 changed files
with
59 additions
and
1 deletion.
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
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,58 @@ | ||
name: Deployment | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
deploy: | ||
runs-on: macos-latest | ||
name: Deploy to Cocoapods Trunk | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Build | ||
run: swift build -v | ||
- uses: actions/checkout@v3 | ||
|
||
- name: setup-cocoapods | ||
uses: maxim-lobanov/setup-cocoapods@v1 | ||
with: | ||
version: 1.11.3 | ||
|
||
- name: Run pod lint for Paystack Core | ||
run: pod lib lint PaystackCore.podspec --allow-warnings | ||
|
||
- name: Get version information | ||
run: | | ||
version=$(/usr/libexec/PlistBuddy -c "Print Version" ./Sources/PaystackSDK/Versioning/versions.plist) | ||
echo "version=${version}" >> $GITHUB_ENV | ||
body=$(/usr/libexec/PlistBuddy -c "Print Description" ./Sources/PaystackSDK/Versioning/versions.plist) | ||
echo "body=${body}" >> $GITHUB_ENV | ||
cd Sources/PaystackSDK/Core/Service/Subscription | ||
PLIST= secrets.plist | ||
/usr/libexec/PlistBuddy -c "Set PUSHER_API_KEY $PUSH_TOKEN" $PLIST | ||
cd ../../../.. | ||
env: | ||
PUSH_TOKEN: ${{ secrets.PUSH_TOKEN }} | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ env.version }} | ||
release_name: ${{ env.version }} | ||
body: ${{ env.body }} | ||
|
||
- name: Install Cocoapods | ||
run: gem install cocoapods | ||
|
||
- name: Deploy to Cocoapods | ||
run: | | ||
set -eo pipefail | ||
pod trunk push PaystackCore.podspec --allow-warnings | ||
pod trunk push PaystackUI.podspec --allow-warnings | ||
env: | ||
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} | ||
|