Skip to content

Commit

Permalink
Edit path CICD
Browse files Browse the repository at this point in the history
  • Loading branch information
iletai committed Mar 29, 2024
1 parent 22eb75d commit fac4a16
Showing 1 changed file with 72 additions and 12 deletions.
84 changes: 72 additions & 12 deletions .github/workflows/build_master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,77 @@ jobs:
uses: swift-actions/setup-swift@v1
with:
swift-version: ${{ matrix.swift }}

- name: Build
run: swift build
deploytococoapods:
name: Deploy to CocoaPods


deploytag:
name: Setup Tag
needs: build
# Reuseable run on os of build job
# Mac Lastest
runs-on: macos-14
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- macos-14
swift:
- "5.9"
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Cocoapod
run: gem install cocoapods
- name: Compress Push To Cocoapods
run: |
set -eo pipefail
pod lib lint --allow-warnings
# Set version source pod spec
version=$(echo "${GITHUB_REF}" | sed -e "s/^refs\/tags\/v//")
sed -i '' "s/s.version = '.*'/s.version = '${version}'/" Pod/Source/YourPod.podspec
pod trunk push --allow-warnings
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPOD_TOKEN }}
informstatus:
name: Inform Status Release Deploy To Cocoapods
needs: deploytag
runs-on: ubuntu-latest
# Check status of deploytag job with sucess and failure
if: ${{ needs.deploytag.result == 'success' }}
steps:
# Call deploycocoadpod.yml
- name: Deploy CocoaPods
uses: ./.github/workflows/deploycocoapods.yml@master

- name: Send Slack Message
uses: rtCamp/action-slack-notify@v2
with:
status: ${{ job.status }}
author_name: ${{ github.actor }}
author_icon: ${{ github.actor }}
title: ${{ github.event_name }}
text: ${{ github.event_name }} - ${{ github.sha }}
fields: ${{ job.status }}
color: ${{ job.status }}
author_link: ${{ github.event.sender.html_url }}
footer: ${{ github.event.repository.full_name }}
footer_icon: ${{ github.event.repository.owner.avatar_url }}
ts: ${{ github.run_id }}
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
informstatusfailure:
name: Inform Status Release Deploy To Cocoapods
needs: deploytag
runs-on: ubuntu-latest
# Check status of deploytag job with sucess and failure
if: ${{ needs.deploytag.result == 'failure' }}
steps:
- name: Send Slack Message
uses: rtCamp/action-slack-notify@v2
with:
status: ${{ job.status }}
author_name: ${{ github.actor }}
author_icon: ${{ github.actor }}
title: ${{ github.event_name }}
text: ${{ github.event_name }} - ${{ github.sha }}
fields: ${{ job.status }}
color: ${{ job.status }}
author_link: ${{ github.event.sender.html_url }}
footer: ${{ github.event.repository.full_name }}
footer_icon: ${{ github.event.repository.owner.avatar_url }}
ts: ${{ github.run_id }}
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}

0 comments on commit fac4a16

Please sign in to comment.