Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: deploy-private-pod CI added and other CI improvements #394

Merged
merged 9 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/deploy-cocoapods.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
name: Deploy to Cocoapods

on:
release:
types: [created]
workflow_run:
workflows: ['Publish new github release']
types: ['completed']

jobs:
build:
name: Deploy to Cocoapods
runs-on: macOS-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout source branch
uses: actions/checkout@v4
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/deploy-private-pod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Deploy to Private Pod

on:
pull_request:
branches:
- master
types:
- opened

jobs:
deploy_private_pod:
name: Deploy to Private Pod
runs-on: macOS-latest
if: (startsWith(github.event.client_payload.branch_name, 'release/') || startsWith(github.event.client_payload.branch_name, 'hotfix-release/'))
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: '${{ github.event.pull_request.head.ref }}'

- name: Install Cocoapods
run: gem install cocoapods

- name: Add Private Spec Repo to CocoaPods installation
run: |
pod repo add Rudder https://${{secrets.PAT_USERNAME}}:${{secrets.PAT}}@github.com/rudderlabs/Specs.git

- name: Add Podspec to repo
run: |
pod repo push Rudder Rudder.podspec
16 changes: 16 additions & 0 deletions .github/workflows/draft-new-beta-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,19 @@ jobs:
- name: Push new version in release branch & tag
run: |
git push

- name: Checkout
uses: actions/checkout@v4
with:
ref: '${{ steps.create-release.outputs.branch_name }}'

- name: Install Cocoapods
run: gem install cocoapods

- name: Add Private Spec Repo to CocoaPods installation
run: |
pod repo add Rudder https://${{secrets.PAT_USERNAME}}:${{secrets.PAT}}@github.com/rudderlabs/Specs.git

- name: Add Podspec to repo
run: |
pod repo push Rudder Rudder.podspec
11 changes: 9 additions & 2 deletions .github/workflows/draft-new-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ jobs:
git add README.md Sources/Classes/Headers/RSVersion.h sonar-project.properties
echo ${{ steps.create-release.outputs.new_version }}
echo "commit_summary=$SUMMARY" >> $GITHUB_OUTPUT
npx standard-version -a --skip.tag
npx standard-version -a

- name: Push new version in release branch & tag
run: |
git push
git push --follow-tags

- name: Create pull request into master
uses: repo-sync/pull-request@v2
Expand All @@ -89,3 +89,10 @@ jobs:
pr_title: "chore(release): pulling ${{ steps.create-release.outputs.branch_name }} into master"
pr_body: ":crown: *An automated PR*\n\n${{ steps.finish-release.outputs.commit_summary }}"
pr_reviewer: 'pallabmaiti'

- name: Repository Dispatch
pallabmaiti marked this conversation as resolved.
Show resolved Hide resolved
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.PAT }}
event-type: private-release
client-payload: '{"branch_name": "${{ steps.create-release.outputs.branch_name }}"}'
12 changes: 4 additions & 8 deletions .github/workflows/publish-new-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,15 @@ jobs:
git config user.name "GitHub actions"
git config user.email [email protected]

- name: Create Github Release & Tag
- name: Create Github Release
id: create_release
env:
HUSKY: 0
GITHUB_TOKEN: ${{ secrets.PAT }}
CONVENTIONAL_GITHUB_RELEASER_TOKEN: ${{ secrets.PAT }}
run: |
git for-each-ref refs/tags
./Scripts/find-tag.sh ${{ steps.extract-version.outputs.release_version }} && git tag --delete ${{ steps.extract-version.outputs.release_version }} && git push --delete origin ${{ steps.extract-version.outputs.release_version }}
git tag -a v${{ steps.extract-version.outputs.release_version }} -m "chore: release v${{ steps.extract-version.outputs.release_version }}"
git push origin refs/tags/v${{ steps.extract-version.outputs.release_version }}
git for-each-ref refs/tags
DEBUG=conventional-github-releaser npx conventional-github-releaser -p angular --config github-release.config.js

DEBUG=conventional-github-releaser npx conventional-github-releaser -p angular
pallabmaiti marked this conversation as resolved.
Show resolved Hide resolved

- name: Create pull request into develop
uses: repo-sync/pull-request@v2
with:
Expand All @@ -60,6 +55,7 @@ jobs:
github_token: ${{ secrets.PAT }}
pr_title: "chore(release): pulling master into develop post release v${{ steps.extract-version.outputs.release_version }}"
pr_body: ':crown: *An automated PR*'
pr_reviewer: 'pallabmaiti'

- name: Delete hotfix release branch
uses: koj-co/delete-merged-action@master
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/slack-notify.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
name: Notify Slack Channel

on:
release:
types: [created]
workflow_run:
workflows: ['Deploy to Cocoapods']
types: ['completed']

jobs:
deploy-tag:
name: Notify Slack
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Send message to Slack channel
id: slack
Expand Down
4 changes: 2 additions & 2 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ PODS:
- RSCrashReporter (~> 1.0.0)
- RudderKit (~> 1.4.0)
- RSCrashReporter (1.0.0)
- Rudder (1.19.2):
- Rudder (1.20.0):
- MetricsReporter (= 1.1.0)
- RudderKit (1.4.0)
- SQLCipher (4.5.4):
Expand Down Expand Up @@ -33,7 +33,7 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
MetricsReporter: d7f4da199ecceefb2e3a49a0b45b288fbadaca1f
RSCrashReporter: 7e26b51ac816e967acb58fa458040946a93a9e65
Rudder: 0c2af547889deaddc88b800d0b04b4ade3fe6ce9
Rudder: 6d1dc8dd6901d503666002ecc9973c2c11d29a89
RudderKit: d9d6997696e1642b753d8bdf94e57af643a68f03
SQLCipher: 905b145f65f349f26da9e60a19901ad24adcd381

Expand Down
Loading