-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add instructions about how to keep README.md of workflows up to date
- Loading branch information
1 parent
98c3809
commit 2eec1f6
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -108,3 +108,50 @@ More about how the upstream action works can be found [here](https://github.com/ | |
### Add new components to Release Please config file | ||
|
||
In order for components to be released, they must be in the [release-please-config.json](./release-please-config.json) file. Always ensure new components are added to this file. | ||
|
||
#### Automatically update README files with the latest version | ||
|
||
As part of using the latest version of an action, it's a good practice to update the README file of each shared workflow every time there is a new release. | ||
|
||
To do so, after adding the name of the new action which needs to be released in the [release-please-config.json](./release-please-config.json) file, the `"extra-files"` field should also be added and include the `README.md` like: | ||
|
||
```json | ||
... | ||
"packages": { | ||
"actions/my-new-action": { | ||
"package-name": "my-new-action", | ||
"extra-files": ["README.md"] | ||
}, | ||
} | ||
``` | ||
|
||
Also, the following block should be added in the README file which will be responsible for updating the version with a new one: | ||
|
||
`README.md`: | ||
```` | ||
# my-new-action | ||
|
||
This is my new action which does awesome stuff! | ||
|
||
<!-- x-release-please-start-version --> # beginning of the release please block | ||
|
||
```yaml | ||
name: My new action | ||
on: | ||
pull_request: | ||
jobs: | ||
my-new-action: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- id: do-stuff | ||
uses: grafana/shared-workflows/actions/[email protected] | ||
``` | ||
|
||
<!-- x-release-please-end-version --> # end of the release please block | ||
|
||
```` | ||
|
||
Every semver-like string nested in the above release-please block, will be updated with the new semver once it's released. |