From c9f342af2c3e00200817a25ff17ae35efd44cfda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Zu=CC=88hlke?= Date: Thu, 21 Nov 2024 10:02:47 +0100 Subject: [PATCH] Switch to codecov action v4 using a token to upload --- .github/workflows/ci.yml | 4 +++- build.sbt | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4b0c4249d..5816628e4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -91,7 +91,9 @@ jobs: run: sbt '++ ${{ matrix.scala }}' validate - name: Codecov - uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + uses: codecov/codecov-action@v4 - name: Make target directories if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) diff --git a/build.sbt b/build.sbt index 8db778a81..86c73d01b 100644 --- a/build.sbt +++ b/build.sbt @@ -58,8 +58,9 @@ ThisBuild / githubWorkflowBuild := .Use(UseRef.Public("coursier", "setup-action", "v1"), params = Map("apps" -> "scalafmt")), WorkflowStep.Sbt(List("validate"), name = Some("Build project")), WorkflowStep.Use( - UseRef.Public("codecov", "codecov-action", "v3"), - name = Some("Codecov") + ref = UseRef.Public("codecov", "codecov-action", "v4"), + name = Some("Codecov"), + env = Map("CODECOV_TOKEN" -> "${{ secrets.CODECOV_TOKEN }}") ) )