diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 5ace4600..00000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,6 +0,0 @@ -version: 2 -updates: - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "weekly" diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md deleted file mode 100644 index 8bab2851..00000000 --- a/.github/pull_request_template.md +++ /dev/null @@ -1,3 +0,0 @@ -# Description - -< Replace with adequate description for this PR> diff --git a/.github/workflows/build-and-quality-checks-v2.yml b/.github/workflows/build-and-quality-checks-v2.yml deleted file mode 100644 index a295736f..00000000 --- a/.github/workflows/build-and-quality-checks-v2.yml +++ /dev/null @@ -1,39 +0,0 @@ -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 diff --git a/.github/workflows/check-pr-title-v2.yml b/.github/workflows/check-pr-title-v2.yml deleted file mode 100644 index 56e0577a..00000000 --- a/.github/workflows/check-pr-title-v2.yml +++ /dev/null @@ -1,16 +0,0 @@ -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/github-action-check-pr-title@v1.0.7 diff --git a/.github/workflows/create-hotfix-branch-v2.yml b/.github/workflows/create-hotfix-branch-v2.yml deleted file mode 100644 index 9976078b..00000000 --- a/.github/workflows/create-hotfix-branch-v2.yml +++ /dev/null @@ -1,21 +0,0 @@ -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/action-create-branch@v2.2.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - branch: 'hotfix-v2/${{ github.event.inputs.hotfix_name }}' diff --git a/.github/workflows/deploy-cocoapods-v2.yml b/.github/workflows/deploy-cocoapods-v2.yml deleted file mode 100644 index d93b8502..00000000 --- a/.github/workflows/deploy-cocoapods-v2.yml +++ /dev/null @@ -1,22 +0,0 @@ -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 diff --git a/.github/workflows/draft-new-release-v2.yml b/.github/workflows/draft-new-release-v2.yml deleted file mode 100644 index 22a82af7..00000000 --- a/.github/workflows/draft-new-release-v2.yml +++ /dev/null @@ -1,90 +0,0 @@ -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 noreply@github.com - - # 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/*/
*/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' diff --git a/.github/workflows/notion-pr-sync-v2.yml b/.github/workflows/notion-pr-sync-v2.yml deleted file mode 100644 index 729c0374..00000000 --- a/.github/workflows/notion-pr-sync-v2.yml +++ /dev/null @@ -1,55 +0,0 @@ -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/github-notion-pr-sync@1.0.0 - with: - notionKey: ${{ secrets.NOTION_BOT_KEY }} - notionDatabaseId: ${{ secrets.NOTION_PR_DB_ID }} - githubKey: ${{ secrets.PAT }} diff --git a/.github/workflows/publish-new-release-v2.yml b/.github/workflows/publish-new-release-v2.yml deleted file mode 100644 index a019b0d7..00000000 --- a/.github/workflows/publish-new-release-v2.yml +++ /dev/null @@ -1,66 +0,0 @@ -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 }} diff --git a/.github/workflows/test-v2.yml b/.github/workflows/test-v2.yml deleted file mode 100644 index 0f1335d4..00000000 --- a/.github/workflows/test-v2.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: 'Tests & Coverage(v2)' -on: - workflow_dispatch: - push: - branches: ['master-v2', 'develop-v2'] - pull_request: - branches: ['master-v2', 'develop-v2'] - types: ['opened', 'reopened', 'synchronize'] - -jobs: - build: - name: 'Tests & Coverage(v2)' - runs-on: macOS-latest - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Install xcpretty - run: gem install xcpretty - -# - name: Run tests(suite) -# run: | -# xcodebuild -scheme RudderSDK-iOS test -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 13' | xcpretty - -# - name: Run tests(1) -# run: | -# xcodebuild -scheme RudderSDK-iOS test -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 13' -only-testing "Tests/Tests" | xcpretty - -# - name: Run tests(2) -# run: | -# xcodebuild -scheme RudderSDK-iOS test -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 13' -only-testing "Tests/Tests2" | xcpretty - -# - name: Run tests(3) -# run: | -# xcodebuild -scheme RudderSDK-iOS test -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 13' -only-testing "Tests/Tests3" | xcpretty - - - name: Install SonarCloud - run: npm install -g sonarqube-scanner - - - name: SonarCloud Scan - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: | - sonar-scanner -Dsonar.host.url=https://sonarcloud.io