mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-18 03:56:52 +02:00
docs: add more info about opening prs (#4106)
add another include with information about PRs, to be included everywhere `repository.md` is included, too. --------- Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
parent
bbcc45b677
commit
f070847a87
@ -225,3 +225,5 @@ You can check the [resource not accessible by integration](https://goreleaser.co
|
||||
## Limitations
|
||||
|
||||
- Only one `GOARM` build is allowed;
|
||||
|
||||
{% include-markdown "../includes/prs.md" comments=false %}
|
||||
|
@ -94,3 +94,5 @@ krews:
|
||||
- Only one binary per archive is allowed;
|
||||
- Binary releases (when `archives.format` is set to `binary`) are not allowed;
|
||||
- Only one `GOARM` build is allowed;
|
||||
|
||||
{% include-markdown "../includes/prs.md" comments=false %}
|
||||
|
@ -138,3 +138,5 @@ Then, you'll need to:
|
||||
That's it!
|
||||
|
||||
[nur]: https://github.com/nix-community/NUR
|
||||
|
||||
{% include-markdown "../includes/prs.md" comments=false %}
|
||||
|
@ -133,3 +133,5 @@ scoop install org/drumroll
|
||||
You can check the
|
||||
[Scoop documentation](https://github.com/lukesampson/scoop/wiki) for more
|
||||
details.
|
||||
|
||||
{% include-markdown "../includes/prs.md" comments=false %}
|
||||
|
59
www/docs/includes/prs.md
Normal file
59
www/docs/includes/prs.md
Normal file
@ -0,0 +1,59 @@
|
||||
## Pull Requests
|
||||
|
||||
> Since v1.17
|
||||
|
||||
GoReleaser allows you to, instead of pushing directly to the main branch, push
|
||||
to a feature branch, and open a pull requests with the changes.
|
||||
|
||||
### Templates
|
||||
|
||||
> Since v1.19
|
||||
|
||||
GoReleaser will check for a `.github/PULL_REQUEST_TEMPLATE.md`, and set it in
|
||||
the pull request body if it exists.
|
||||
|
||||
We do that to prevent extra work for maintainers of things like `winget-pkgs`,
|
||||
`nixpkgs`, and so on.
|
||||
|
||||
### Cross-repository pull requests
|
||||
|
||||
> Since v1.19
|
||||
|
||||
You can also push to a fork, and open the pull request in the original branch.
|
||||
|
||||
Here's an example on how to set it up:
|
||||
|
||||
```yaml
|
||||
# .goreleaser.yml
|
||||
# ...
|
||||
something: # can be nix, brews, etc...
|
||||
- repository:
|
||||
owner: john
|
||||
name: repo
|
||||
branch: "{{.ProjectName}}-{{.Version}}"
|
||||
pull_request:
|
||||
enabled: true
|
||||
base:
|
||||
owner: mike
|
||||
name: repo
|
||||
branch: main
|
||||
```
|
||||
|
||||
This will:
|
||||
|
||||
- Create the files into `john/repo`, in the branch `foo-1.2.3` (assuming
|
||||
`ProjectName=foo` and `Version=1.2.3`). [^head]
|
||||
- Open a pull request from `john/repo` into `mike/repo`, with the branch `main`
|
||||
as target. [^base]
|
||||
|
||||
[^head]: In GitHub's terms, this means `head=john:repo:foo-1.2.3`
|
||||
[^base]: In GitHub's terms, this means `base=mike:repo:main`
|
||||
|
||||
### Things that don't work
|
||||
|
||||
- **GoReleaser will not keep your fork in sync!!!** It might or might not be a
|
||||
problem in your case, in which case you'll have to sync it manually.
|
||||
- Opening pull requests to a forked repository (`go-github` does not have the
|
||||
required fields to do it).
|
||||
- Since this can fail for a myriad of reasons, if an error happen, it'll log it
|
||||
to the release output, but will not fail the pipeline.
|
Loading…
x
Reference in New Issue
Block a user