Skip to content

Commit 59871d5

Browse files
authored
Add release instructions (#11)
* Add release instructions * Enable prettier on README
1 parent 82e8d1e commit 59871d5

File tree

3 files changed

+46
-40
lines changed

3 files changed

+46
-40
lines changed

.github/workflows/release.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.prettierignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@ dist/*
22
package.json
33
.eslintrc.json
44
.github/
5-
README.md
65
yarn.lock

README.md

Lines changed: 46 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# Code Coverage Assistant
2+
23
[![CI](https://github.com/peter-evans/create-pull-request/workflows/CI/badge.svg)](https://github.com/ScaCap/code-coverage-assistant/actions?query=workflow%3ACI)
34

45
> [GitHub Action](https://help.github.com/en/actions) to assist the pull request with code coverage stats
5-
- Code coverage comment for monorepo
6-
- Code coverage comment for single repo
7-
- Code coverage diff from base branch
6+
7+
- Code coverage comment for monorepo
8+
- Code coverage comment for single repo
9+
- Code coverage diff from base branch
810

911
The report is based on the lcov coverage report generated by your test runner.
1012

@@ -13,21 +15,20 @@ The report is based on the lcov coverage report generated by your test runner.
1315
Just add this action to one of your [workflow files](https://docs.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow):
1416

1517
```yml
16-
- name: Add coverage comment
17-
uses: ScaCap/code-coverage-assistant@v1
18+
- name: Add coverage comment
19+
uses: ScaCap/code-coverage-assistant@v1
1820
```
1921
20-
2122
### Action inputs
2223
2324
The possible inputs for this action are:
2425
25-
| Parameter | Description | Default |
26-
| --------- | ----------- | ------- |
27-
| `github-token` (**Required**) | Github token used for posting the comment. To use the key provided by the GitHub action runner, use `${{ secrets.GITHUB_TOKEN }}`. | |
28-
| `monorepo-base-path` (**Optional**) | The location of your monrepo `packages` path| |
29-
| `lcov-file` (**Optional**) | The location of the lcov file to read the coverage report. `Needed only for single repos` | `./coverage/lcov.info` |
30-
| `lcov-base` (**Optional**) | The location of the lcov file resulting from running the tests in the base branch. When this is set a diff of the coverage percentages is shown. `Needed only for single repos`.| |
26+
| Parameter | Description | Default |
27+
| ----------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- |
28+
| `github-token` (**Required**) | Github token used for posting the comment. To use the key provided by the GitHub action runner, use `${{ secrets.GITHUB_TOKEN }}`. | |
29+
| `monorepo-base-path` (**Optional**) | The location of your monrepo `packages` path | |
30+
| `lcov-file` (**Optional**) | The location of the lcov file to read the coverage report. `Needed only for single repos` | `./coverage/lcov.info` |
31+
| `lcov-base` (**Optional**) | The location of the lcov file resulting from running the tests in the base branch. When this is set a diff of the coverage percentages is shown. `Needed only for single repos`. | |
3132

3233
## Examples
3334

@@ -37,7 +38,7 @@ The possible inputs for this action are:
3738
uses: ScaCap/code-coverage-assistant@v1
3839
with:
3940
github-token: ${{ secrets.GITHUB_TOKEN }}
40-
monorepo-base-path: './packages'
41+
monorepo-base-path: "./packages"
4142
```
4243

4344
![](/assets/example_monorepo.png)
@@ -48,7 +49,7 @@ with:
4849
uses: ScaCap/code-coverage-assistant@v1
4950
with:
5051
github-token: ${{ secrets.GITHUB_TOKEN }}
51-
lcov-file: './app/coverage/lcov.info'
52+
lcov-file: "./app/coverage/lcov.info"
5253
```
5354

5455
![](/assets/example_single_repo.png)
@@ -61,11 +62,41 @@ with:
6162
uses: ScaCap/code-coverage-assistant@v1
6263
with:
6364
github-token: ${{ secrets.GITHUB_TOKEN }}
64-
monorepo-base-path: './packages'
65+
monorepo-base-path: "./packages"
6566
```
6667

6768
![](/assets/example_diff.png)
6869

70+
## Development
71+
72+
### Contributing
73+
74+
Contributions are encouraged! Fork this repo and open a pull request.
75+
76+
### Commands
77+
78+
| command | description |
79+
| -------- | --------------------------------------------------------------------------------------------------------- |
80+
| `test` | Run the unit tests |
81+
| `eslint` | Run eslint on all applicable files |
82+
| `format` | Run prettier on all applicable files |
83+
| `build` | build the dist file. You are required to run this locally in order to build the dist before opening a PR. |
84+
85+
### Releasing
86+
87+
This action follows [semantic versioning](https://semver.org/).
88+
89+
#### Creating a release
90+
91+
- Ensure master is up to date with all the changes for the next release
92+
- In the [GitHub releases page](https://github.com/ScaCap/code-coverage-assistant/releases), click "draft a new release"
93+
- Choose a tag matching this pattern: `vX.X.X`
94+
- Choose `master` as the target
95+
- Use the exact tag as the release title
96+
- Write a description containing all the changes since the last release, and detailing any breaking changes
97+
- Choose "Publish Release"
98+
- Github will create the release and add the appropriate tag
99+
69100
## Acknowledgements
70101

71102
The initial code is based on [romeovs/lcov-reporter-action](https://github.com/romeovs/lcov-reporter-action).

0 commit comments

Comments
 (0)