2020-09-24 02:20:56 +02:00
|
|
|
# Semantic Release
|
|
|
|
|
|
|
|
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
|
2022-05-09 19:48:35 +02:00
|
|
|
[svu](https://github.com/caarlos0/svu) or [semantic-release](https://github.com/semantic-release/semantic-release).
|
|
|
|
|
|
|
|
## Example: svu
|
2020-09-24 02:20:56 +02:00
|
|
|
|
|
|
|
```bash
|
|
|
|
git tag "$(svu next)"
|
|
|
|
git push --tags
|
|
|
|
goreleaser --rm-dist
|
|
|
|
```
|
2022-05-09 19:48:35 +02:00
|
|
|
|
|
|
|
## 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
|
|
|
|
```
|