[codecov] use Codecov GitHub Action to upload coverage (#6467)

diff --git a/.github/workflows/otbr.yml b/.github/workflows/otbr.yml
index 7dc6195..9106491 100644
--- a/.github/workflows/otbr.yml
+++ b/.github/workflows/otbr.yml
@@ -172,9 +172,14 @@
     - uses: actions/download-artifact@v2
       with:
         path: coverage/
-    - name: Upload Coverage
+    - name: Combine Coverage
       run: |
-        script/test upload_codecov
+        script/test combine_coverage
+    - name: Upload Coverage
+      uses: codecov/codecov-action@v1
+      with:
+        files: final.info
+        fail_ci_if_error: true
 
   delete-coverage-artifacts:
     needs: upload-coverage
diff --git a/.github/workflows/posix.yml b/.github/workflows/posix.yml
index 0f31cc4..c54eebc 100644
--- a/.github/workflows/posix.yml
+++ b/.github/workflows/posix.yml
@@ -281,9 +281,14 @@
     - uses: actions/download-artifact@v2
       with:
         path: coverage/
-    - name: Upload Coverage
+    - name: Combine Coverage
       run: |
-        script/test upload_codecov
+        script/test combine_coverage
+    - name: Upload Coverage
+      uses: codecov/codecov-action@v1
+      with:
+        files: final.info
+        fail_ci_if_error: true
 
   delete-coverage-artifacts:
     needs: upload-coverage
diff --git a/.github/workflows/simulation-1.1.yml b/.github/workflows/simulation-1.1.yml
index 4ca4689..2e3f11b 100644
--- a/.github/workflows/simulation-1.1.yml
+++ b/.github/workflows/simulation-1.1.yml
@@ -507,9 +507,14 @@
     - uses: actions/download-artifact@v2
       with:
         path: coverage/
-    - name: Upload Coverage
+    - name: Combine Coverage
       run: |
-        script/test upload_codecov
+        script/test combine_coverage
+    - name: Upload Coverage
+      uses: codecov/codecov-action@v1
+      with:
+        files: final.info
+        fail_ci_if_error: true
 
   delete-coverage-artifacts:
     needs: upload-coverage
diff --git a/.github/workflows/simulation-1.2.yml b/.github/workflows/simulation-1.2.yml
index 329e97e..a48f47f 100644
--- a/.github/workflows/simulation-1.2.yml
+++ b/.github/workflows/simulation-1.2.yml
@@ -320,9 +320,14 @@
     - uses: actions/download-artifact@v2
       with:
         path: coverage/
-    - name: Upload Coverage
+    - name: Combine Coverage
       run: |
-        script/test upload_codecov
+        script/test combine_coverage
+    - name: Upload Coverage
+      uses: codecov/codecov-action@v1
+      with:
+        files: final.info
+        fail_ci_if_error: true
 
   delete-coverage-artifacts:
     needs: upload-coverage
diff --git a/.github/workflows/toranj.yml b/.github/workflows/toranj.yml
index f5124ee..ff88daa 100644
--- a/.github/workflows/toranj.yml
+++ b/.github/workflows/toranj.yml
@@ -99,9 +99,14 @@
     - uses: actions/download-artifact@v2
       with:
         path: coverage/
-    - name: Upload Coverage
+    - name: Combine Coverage
       run: |
-        script/test upload_codecov
+        script/test combine_coverage
+    - name: Upload Coverage
+      uses: codecov/codecov-action@v1
+      with:
+        files: final.info
+        fail_ci_if_error: true
 
   delete-coverage-artifacts:
     needs: upload-coverage
diff --git a/script/test b/script/test
index c2cf53c..d4aa6f5 100755
--- a/script/test
+++ b/script/test
@@ -510,7 +510,7 @@
     lcov --extract tmp/coverage.info "$PWD/src/core/common/message.cpp" | c++filt
 }
 
-do_upload_codecov()
+do_combine_coverage()
 {
     ls -R coverage/
 
@@ -522,21 +522,6 @@
         args+=("$i")
     done
     lcov "${args[@]}" -o final.info
-
-    local retry_count=5
-    local fail_count=0
-    until ((fail_count > retry_count)); do
-        # TODO: removed the existing command due to security concerns
-        echo "WARNIING: CODECOV DISABLED"
-        break
-        ((++fail_count))
-        echo >&2 "Upload failed, retrying (${fail_count}/${retry_count})"
-        sleep 1m
-    done
-
-    if ((fail_count > retry_count)); then
-        exit 1
-    fi
 }
 
 envsetup()
@@ -647,8 +632,8 @@
                 shift
                 do_generate_coverage "$1"
                 ;;
-            upload_codecov)
-                do_upload_codecov
+            combine_coverage)
+                do_combine_coverage
                 ;;
             *)
                 echo