1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-02-05 13:15:26 +02:00

docs: add example for semantic-release (#3091)

This commit is contained in:
Felix Börner 2022-05-09 19:48:35 +02:00 committed by GitHub
parent 8b0fa0c268
commit 2297be1cf7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,10 +3,33 @@
GoReleaser does not create any tags, it just runs on what is already there.
You can, though, leverage other tools to do the work for you, like for example
[svu](https://github.com/caarlos0/svu):
[svu](https://github.com/caarlos0/svu) or [semantic-release](https://github.com/semantic-release/semantic-release).
## Example: svu
```bash
git tag "$(svu next)"
git push --tags
goreleaser --rm-dist
```
## Example: semantic-release
.releaserc.yml
```yaml
preset: angular
plugins:
- "@semantic-release/commit-analyzer"
- "@semantic-release/release-notes-generator"
- "@semantic-release/changelog"
- "@semantic-release/git"
- - "@semantic-release/exec"
- publishCmd: |
echo "${nextRelease.notes}" > /tmp/release-notes.md
goreleaser release --release-notes /tmp/release-notes.md --rm-dist
```
```bash
npx -p @semantic-release/changelog -p @semantic-release/exec -p @semantic-release/git semantic-release
```