-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
563 additions
and
304 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,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
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 |
---|---|---|
@@ -1,15 +1,3 @@ | ||
## Type of change | ||
- [ ] Bug fix (non-breaking change which fixes an issue) | ||
- [ ] New feature (non-breaking change which adds functionality) | ||
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) | ||
## Checklist: | ||
- [ ] Version updated in `README` | ||
- [ ] Version updated in `RSConstant.swift` | ||
- [ ] Version updated in `RudderStack.xcodeproj` | ||
- [ ] Version updated in `RudderStack.podspec` | ||
- [ ] `CHANGELOG` Updated | ||
- [ ] I have performed a self-review of my own code | ||
- [ ] I have commented my code, particularly in hard-to-understand areas | ||
- [ ] I have added unit tests for the code | ||
- [ ] I have made corresponding changes to the documentation | ||
- [ ] Passed `pod lib lint --no-clean --allow-warnings` | ||
# Description | ||
|
||
< Replace with adequate description for this PR> |
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,39 @@ | ||
name: Code Quality Checks(v2) | ||
on: | ||
pull_request: | ||
branches: ['master-v2', 'develop-v2'] | ||
types: ['opened', 'reopened', 'synchronize'] | ||
|
||
jobs: | ||
build: | ||
name: Code Quality Checks(v2) | ||
runs-on: macOS-latest | ||
|
||
steps: | ||
- name: Checkout source branch | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install xcpretty | ||
run: gem install xcpretty | ||
|
||
- name: Build SDK(iOS) | ||
run: | | ||
xcodebuild build -scheme RudderSDK-iOS -workspace Rudder.xcworkspace -destination 'platform=iOS Simulator,name=iPhone 13' | xcpretty | ||
- name: Build SDK(watchOS) | ||
run: | | ||
xcodebuild build -scheme RudderSDK-iOS -workspace Rudder.xcworkspace -destination 'platform=watchOS Simulator,name=Apple Watch Series 7 - 45mm' | xcpretty | ||
- name: Build SDK(tvOS) | ||
run: | | ||
xcodebuild build -scheme RudderSDK-iOS -workspace Rudder.xcworkspace -destination 'platform=tvOS Simulator,name=Apple TV' | xcpretty | ||
- name: Build SDK(macOS) | ||
run: | | ||
xcodebuild build -scheme RudderSDK-iOS -workspace Rudder.xcworkspace -destination 'platform=macOS,variant=Mac Catalyst' | xcpretty | ||
- name: Install Cocoapods | ||
run: gem install cocoapods | ||
|
||
- name: Execute pod lint | ||
run: pod lib lint --no-clean --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,16 @@ | ||
name: Check PR title(v2) | ||
on: | ||
pull_request: | ||
branches: ['master-v2', 'develop-v2'] | ||
types: ['opened', 'reopened', 'edited', 'synchronize'] | ||
|
||
jobs: | ||
check_pr_title: | ||
name: Check PR title(v2) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source branch | ||
uses: actions/checkout@v3 | ||
|
||
- name: Check PR title | ||
uses: rudderlabs/[email protected] |
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,21 @@ | ||
name: Create new hotfix branch(v2) | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
hotfix_name: | ||
description: Hotfix branch name | ||
required: true | ||
|
||
jobs: | ||
create-branch: | ||
name: Create new branch | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/master-v2' | ||
steps: | ||
- name: Create branch | ||
uses: peterjgrainger/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
branch: 'hotfix-v2/${{ github.event.inputs.hotfix_name }}' |
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,22 @@ | ||
name: Deploy to Cocoapods(v2) | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
build: | ||
name: Deploy to Cocoapods | ||
runs-on: macOS-latest | ||
steps: | ||
- name: Checkout source branch | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Cocoapods | ||
run: gem install cocoapods | ||
|
||
- name: Publish to CocoaPod | ||
env: | ||
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }} | ||
run: | | ||
pod trunk push --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,90 @@ | ||
name: Draft new release(v2) | ||
|
||
on: | ||
workflow_dispatch | ||
|
||
jobs: | ||
draft-new-release: | ||
name: Draft a new release(v2) | ||
runs-on: ubuntu-latest | ||
if: startsWith(github.ref, 'refs/heads/develop-v2') || startsWith(github.ref, 'refs/heads/hotfix-v2/') | ||
steps: | ||
- name: Checkout source branch | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set Node 16 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
|
||
# In order to make a commit, we need to initialize a user. | ||
# You may choose to write something less generic here if you want, it doesn't matter functionality wise. | ||
- name: Initialize mandatory git config | ||
run: | | ||
git config user.name "GitHub actions" | ||
git config user.email [email protected] | ||
# Calculate the next release version based on conventional semantic release | ||
- name: Create release branch | ||
id: create-release | ||
env: | ||
HUSKY: 0 | ||
run: | | ||
source_branch_name=${GITHUB_REF##*/} | ||
release_type=release | ||
grep -q "hotfix/" <<< "${GITHUB_REF}" && release_type=hotfix-release | ||
git fetch origin master-v2 --depth=1 | ||
git merge origin/master-v2 | ||
current_version=$(jq -r .version package.json) | ||
npx standard-version --skip.commit --skip.tag --skip.changelog | ||
new_version=$(jq -r .version package.json) | ||
git reset --hard | ||
branch_name="${release_type}/${new_version}" | ||
echo "Source branch for new release is $source_branch_name" | ||
echo "Current version is $current_version" | ||
echo "Release type is $release_type" | ||
echo "New version is $new_version" | ||
echo "New release branch name is $branch_name" | ||
git checkout -b "$branch_name" | ||
git push --set-upstream origin "$branch_name" | ||
echo "source_branch_name=$source_branch_name" >> $GITHUB_OUTPUT | ||
echo "branch_name=$branch_name" >> $GITHUB_OUTPUT | ||
echo "new_version=$new_version" >> $GITHUB_OUTPUT | ||
echo "CURRENT_VERSION_VALUE=$current_version" >> $GITHUB_ENV | ||
echo "NEW_VERSION_VALUE=$new_version" >> $GITHUB_ENV | ||
- name: Update changelog & bump version | ||
id: finish-release | ||
env: | ||
HUSKY: 0 | ||
run: | | ||
npm i -g conventional-changelog-cli | ||
SUMMARY=$(((npx conventional-changelog -u) 2>&1) | sed "s/*/<br> */g" | sed "s/#/ /g" | tr -d '\n' || true) | ||
echo $SUMMARY | ||
echo "Current version: $CURRENT_VERSION_VALUE" | ||
echo "New version: $NEW_VERSION_VALUE" | ||
npx replace $CURRENT_VERSION_VALUE $NEW_VERSION_VALUE README.md Sources/Classes/Common/Constants/RSVersion.swift sonar-project.properties | ||
git add README.md Sources/Classes/Common/Constants/RSVersion.swift sonar-project.properties | ||
echo ${{ steps.create-release.outputs.new_version }} | ||
echo "commit_summary=$SUMMARY" >> $GITHUB_OUTPUT | ||
npx standard-version -a | ||
- name: Push new version in release branch & tag | ||
run: | | ||
git push --follow-tags | ||
- name: Create pull request into master | ||
uses: repo-sync/pull-request@v2 | ||
with: | ||
source_branch: ${{ steps.create-release.outputs.branch_name }} | ||
destination_branch: 'master-v2' | ||
github_token: ${{ secrets.PAT }} | ||
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' |
This file was deleted.
Oops, something went wrong.
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,55 @@ | ||
name: Notion PR Sync(v2) | ||
|
||
on: | ||
issues: | ||
types: | ||
[ | ||
opened, | ||
edited, | ||
deleted, | ||
transferred, | ||
pinned, | ||
unpinned, | ||
closed, | ||
reopened, | ||
assigned, | ||
unassigned, | ||
labeled, | ||
unlabeled, | ||
locked, | ||
unlocked, | ||
milestoned, | ||
demilestoned, | ||
] | ||
pull_request: | ||
types: | ||
[ | ||
assigned, | ||
unassigned, | ||
labeled, | ||
unlabeled, | ||
opened, | ||
edited, | ||
closed, | ||
reopened, | ||
synchronize, | ||
converted_to_draft, | ||
ready_for_review, | ||
locked, | ||
unlocked, | ||
review_requested, | ||
review_request_removed, | ||
auto_merge_enabled, | ||
auto_merge_disabled, | ||
] | ||
|
||
jobs: | ||
request: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Sync Github PRs to Notion | ||
uses: sivashanmukh/[email protected] | ||
with: | ||
notionKey: ${{ secrets.NOTION_BOT_KEY }} | ||
notionDatabaseId: ${{ secrets.NOTION_PR_DB_ID }} | ||
githubKey: ${{ secrets.PAT }} |
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,66 @@ | ||
name: Publish new github release(v2) | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master-v2 | ||
types: | ||
- closed | ||
|
||
jobs: | ||
release: | ||
name: Publish new release(v2) | ||
runs-on: ubuntu-latest | ||
if: (startsWith(github.event.pull_request.head.ref, 'release/') || startsWith(github.event.pull_request.head.ref, 'hotfix-release/')) && github.event.pull_request.merged == true # only merged pull requests must trigger this job | ||
steps: | ||
- name: Extract version from branch name (for release branches) | ||
id: extract-version | ||
run: | | ||
BRANCH_NAME="${{ github.event.pull_request.head.ref }}" | ||
VERSION=${BRANCH_NAME#hotfix-} | ||
VERSION=${VERSION#release/} | ||
echo "release_version=$VERSION" >> $GITHUB_OUTPUT | ||
- name: Checkout source branch | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set Node 16 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
|
||
- name: Create Github Release | ||
id: create_release | ||
env: | ||
HUSKY: 0 | ||
GITHUB_TOKEN: ${{ secrets.PAT }} | ||
CONVENTIONAL_GITHUB_RELEASER_TOKEN: ${{ secrets.PAT }} | ||
run: | | ||
npx conventional-github-releaser -p angular | ||
- name: Create pull request into develop | ||
uses: repo-sync/pull-request@v2 | ||
with: | ||
source_branch: 'master-v2' | ||
destination_branch: 'develop-v2' | ||
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*' | ||
|
||
- name: Delete hotfix release branch | ||
uses: koj-co/delete-merged-action@master | ||
if: startsWith(github.event.pull_request.head.ref, 'hotfix-release/') | ||
with: | ||
branches: 'hotfix-release/*' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Delete release branch | ||
uses: koj-co/delete-merged-action@master | ||
if: startsWith(github.event.pull_request.head.ref, 'release/') | ||
with: | ||
branches: 'release/*' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
Oops, something went wrong.