Skip to content

Commit 43235cc

Browse files
Update README.md (#1237)
* Update README.md * Update README.md
1 parent 0cf8684 commit 43235cc

File tree

1 file changed

+12
-19
lines changed

1 file changed

+12
-19
lines changed

README.md

+12-19
Original file line numberDiff line numberDiff line change
@@ -5,44 +5,36 @@
55
[![Workflow for Codecov Action](https://github.com/codecov/codecov-action/actions/workflows/main.yml/badge.svg)](https://github.com/codecov/codecov-action/actions/workflows/main.yml)
66
### Easily upload coverage reports to Codecov from GitHub Actions
77

8-
## v4 Beta Release
9-
`v4` of the Codecov GitHub Action will use the [Codecov CLI](https://github.com/codecov/codecov-cli) to upload coverage reports to Codecov. Currently, `v4` is in beta.
8+
## v4 Release
9+
`v4` of the Codecov GitHub Action will use the [Codecov CLI](https://github.com/codecov/codecov-cli) to upload coverage reports to Codecov.
1010

1111
Breaking Changes
1212
- No current support for `aarch64` and `alpine` architectures.
13-
- Tokenless uploading is unsupported
13+
- Tokenless uploading is unsupported. However, PRs made from forks to the upstream public repos will support tokenless (e.g. contributors to OS projects do not need the upstream repo's Codecov token)
1414
- Various arguments to the Action have been removed
1515

16-
`v3` versions and below will not have access to CLI features (e.g. global upload token).
17-
18-
## ⚠️ Deprecation of v1
19-
**As of February 1, 2022, v1 has been fully sunset and no longer functions**
20-
21-
Due to the [deprecation](https://about.codecov.io/blog/introducing-codecovs-new-uploader/) of the underlying bash uploader,
22-
the Codecov GitHub Action has released `v2`/`v3` which will use the new [uploader](https://github.com/codecov/uploader). You can learn
23-
more about our deprecation plan and the new uploader on our [blog](https://about.codecov.io/blog/introducing-codecovs-new-uploader/).
24-
25-
We will be restricting any updates to the `v1` Action to security updates and hotfixes.
16+
`v3` versions and below will not have access to CLI features (e.g. global upload token, ATS).
2617

2718
## Usage
2819

29-
To integrate Codecov with your Actions pipeline, specify the name of this repository with a tag number (`@v3` is recommended) as a `step` within your `workflow.yml` file.
20+
To integrate Codecov with your Actions pipeline, specify the name of this repository with a tag number (`@v4` is recommended) as a `step` within your `workflow.yml` file.
3021

31-
If you have a *private repository*, this Action also requires you to [provide an upload token](https://docs.codecov.io/docs/frequently-asked-questions#section-where-is-the-repository-upload-token-found-) from [codecov.io](https://www.codecov.io) (tip: in order to avoid exposing your token, store it as a `secret`). Optionally, you can choose to include up to four additional inputs to customize the upload context. **For public repositories, no token is needed**
22+
This Action also requires you to [provide an upload token](https://docs.codecov.io/docs/frequently-asked-questions#section-where-is-the-repository-upload-token-found-) from [codecov.io](https://www.codecov.io) (tip: in order to avoid exposing your token, [store it](https://docs.codecov.com/docs/adding-the-codecov-token#github-actions) as a `secret`).
3223

3324
Inside your `.github/workflows/workflow.yml` file:
3425

3526
```yaml
3627
steps:
3728
- uses: actions/checkout@master
38-
- uses: codecov/codecov-action@v3
29+
- uses: codecov/codecov-action@v4
3930
with:
40-
token: ${{ secrets.CODECOV_TOKEN }}
4131
files: ./coverage1.xml,./coverage2.xml # optional
4232
flags: unittests # optional
4333
name: codecov-umbrella # optional
4434
fail_ci_if_error: true # optional (default = false)
4535
verbose: true # optional (default = false)
36+
env:
37+
token: ${{ secrets.CODECOV_TOKEN }}
4638
```
4739
>**Note**: This assumes that you've set your Codecov token inside *Settings > Secrets* as `CODECOV_TOKEN`. If not, you can [get an upload token](https://docs.codecov.io/docs/frequently-asked-questions#section-where-is-the-repository-upload-token-found-) for your specific repo on [codecov.io](https://www.codecov.io). Keep in mind that secrets are *not* available to forks of repositories.
4840

@@ -118,16 +110,17 @@ jobs:
118110
pip install pytest-cov
119111
pytest --cov=./ --cov-report=xml
120112
- name: Upload coverage to Codecov
121-
uses: codecov/codecov-action@v3
113+
uses: codecov/codecov-action@v4
122114
with:
123-
token: ${{ secrets.CODECOV_TOKEN }}
124115
directory: ./coverage/reports/
125116
env_vars: OS,PYTHON
126117
fail_ci_if_error: true
127118
files: ./coverage1.xml,./coverage2.xml,!./cache
128119
flags: unittests
129120
name: codecov-umbrella
130121
verbose: true
122+
env:
123+
token: ${{ secrets.CODECOV_TOKEN }}
131124
```
132125
## Contributing
133126

0 commit comments

Comments
 (0)