diff --git a/.github/workflows/build-and-quality-checks.yml b/.github/workflows/build-and-quality-checks.yml index f4c903c5..5f2fbd33 100644 --- a/.github/workflows/build-and-quality-checks.yml +++ b/.github/workflows/build-and-quality-checks.yml @@ -5,8 +5,17 @@ on: types: ['opened', 'reopened', 'synchronize'] jobs: + cancel_previous: + name: 'Cancel previous Code Quality Checks' + runs-on: ubuntu-latest + steps: + - uses: styfle/cancel-workflow-action@0.11.0 + with: + workflow_id: ${{ github.event.workflow.id }} + build: - name: Code Quality Checks + name: 'Code Quality Checks' + needs: cancel_previous runs-on: macOS-latest steps: diff --git a/.github/workflows/deploy-cocoapods-beta.yml b/.github/workflows/deploy-beta-cocoapods.yml similarity index 100% rename from .github/workflows/deploy-cocoapods-beta.yml rename to .github/workflows/deploy-beta-cocoapods.yml diff --git a/.github/workflows/deploy-cocoapods.yml b/.github/workflows/deploy-cocoapods.yml index f3fbfd5a..ec36d0a6 100644 --- a/.github/workflows/deploy-cocoapods.yml +++ b/.github/workflows/deploy-cocoapods.yml @@ -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 diff --git a/.github/workflows/deploy-private-pod.yml b/.github/workflows/deploy-private-pod.yml new file mode 100644 index 00000000..0077bd16 --- /dev/null +++ b/.github/workflows/deploy-private-pod.yml @@ -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 diff --git a/.github/workflows/draft-new-beta-release.yml b/.github/workflows/draft-new-beta-release.yml index 26d7949c..f58115a9 100644 --- a/.github/workflows/draft-new-beta-release.yml +++ b/.github/workflows/draft-new-beta-release.yml @@ -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 diff --git a/.github/workflows/draft-new-release.yml b/.github/workflows/draft-new-release.yml index fb71e516..013f8227 100644 --- a/.github/workflows/draft-new-release.yml +++ b/.github/workflows/draft-new-release.yml @@ -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 diff --git a/.github/workflows/publish-new-release.yml b/.github/workflows/publish-new-release.yml index 5d6a9298..bfe7e181 100644 --- a/.github/workflows/publish-new-release.yml +++ b/.github/workflows/publish-new-release.yml @@ -38,18 +38,13 @@ jobs: git config user.name "GitHub actions" git config user.email noreply@github.com - - 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 - name: Create pull request into develop @@ -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 diff --git a/.github/workflows/slack-notify.yml b/.github/workflows/slack-notify.yml index 40d90e8e..cf5c9b8d 100644 --- a/.github/workflows/slack-notify.yml +++ b/.github/workflows/slack-notify.yml @@ -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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cd3f3449..827bdd85 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,8 +8,17 @@ on: types: ['opened', 'reopened', 'synchronize'] jobs: + cancel_previous: + name: 'Cancel previous Tests & Coverage' + runs-on: ubuntu-latest + steps: + - uses: styfle/cancel-workflow-action@0.11.0 + with: + workflow_id: ${{ github.event.workflow.id }} + build: name: 'Tests & Coverage' + needs: cancel_previous runs-on: macOS-latest env: BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed diff --git a/Podfile.lock b/Podfile.lock index e617fccd..0eb8ecb4 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -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): @@ -33,7 +33,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: MetricsReporter: d7f4da199ecceefb2e3a49a0b45b288fbadaca1f RSCrashReporter: 7e26b51ac816e967acb58fa458040946a93a9e65 - Rudder: 0c2af547889deaddc88b800d0b04b4ade3fe6ce9 + Rudder: 6d1dc8dd6901d503666002ecc9973c2c11d29a89 RudderKit: d9d6997696e1642b753d8bdf94e57af643a68f03 SQLCipher: 905b145f65f349f26da9e60a19901ad24adcd381