1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-08 03:31:59 +02:00
Commit Graph

170 Commits

Author SHA1 Message Date
Carlos Alexandro Becker
ec0df9ecd5
fix: failing when pull_request.base is empty (#4261)
if the base branch is empty, it'll try to fetch the default branch,
which would fail if base repo name/owner are also empty.

the default behavior when base owner/name are missing is to using
head's, so I changed it do that before trying to get the default branch,
which should fix the issue.
2023-08-27 16:40:40 -03:00
Carlos Alexandro Becker
c91c4b7cd8
feat: improve template error handling (#4256)
- wrap the multiple errors in an internal error with cleaner messaging
- improve testlib.RequireTemplateError and several tests
2023-08-24 22:06:12 -03:00
Carlos Alexandro Becker
53bcbe951a
feat(deps): update go-github to v54 (#4251)
<!--

Hi, thanks for contributing!

Please make sure you read our CONTRIBUTING guide.

Also, add tests and the respective documentation changes as well.

-->


<!-- If applied, this commit will... -->

...

<!-- Why is this change being made? -->

...

<!-- # Provide links to any relevant tickets, URLs or other resources
-->

...

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-08-24 10:50:36 -03:00
Carlos Alexandro Becker
a726a29d70
fix(winget): improve commit msgs (#4199)
closes  #4198
2023-07-19 22:04:45 -03:00
Hidde Beydals
326a8c885e
feat: support make_latest for GitHub release (#4161)
This commit adds a `make_latest` boolean to the release configuration,
to allow signaling to GitHub if the release should be marked as latest.

Albeit being a boolean, the internal Go type is a string to allow
to distinguish an empty string (default behavior: `true`) from an
explicit `false`.

For more information around the GitHub API field, see

https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28#create-a-release

I did not include the `legacy` option, to not adopt something which
appears to be scheduled for removal in the future.

In addition, I opted for `make_latest` over `latest` because the
option is only available for GitHub. Which keeps the latter key
reserved for e.g. future use of a config option which is used across
Git providers.

Fixes #4159

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-07-14 01:45:57 +00:00
Hidde Beydals
9f6a810fbc
Support make_latest for GitHub release (#4161)
This commit adds a `make_latest` boolean to the release configuration,
to allow signaling to GitHub if the release should be marked as latest.

Albeit being a boolean, the internal Go type is a string to allow
to distinguish an empty string (default behavior: `true`) from an
explicit `false`.

For more information around the GitHub API field, see

https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28#create-a-release

I did not include the `legacy` option, to not adopt something which
appears to be scheduled for removal in the future.

In addition, I opted for `make_latest` over `latest` because the
option is only available for GitHub. Which keeps the latter key
reserved for e.g. future use of a config option which is used across
Git providers.

Fixes #4159

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
2023-07-13 22:42:20 -03:00
Carlos Alexandro Becker
a3a15fb18b
test: improve test func names for clients
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-07-14 01:42:00 +00:00
Carlos Alexandro Becker
ecb8dc54d7
test: fix another gitea test 2023-07-14 01:36:48 +00:00
Carlos Alexandro Becker
cd49d184b8
test: fix broken gitea test due to api changes
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-07-14 00:33:34 +00:00
Carlos Alexandro Becker
86beb584bf
fix: improve error message
refs #4160
2023-07-03 19:01:11 +00:00
Carlos Alexandro Becker
f883131e73
fix(github): check rate limit again after sleeping (#4152)
also ensure sleep > 0

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-29 14:00:23 -03:00
Carlos Alexandro Becker
7d485d6399
fix(winget): default commit message
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-26 17:09:18 +00:00
Carlos Alexandro Becker
d085b3ad44
feat(deps): bump github.com/google/go-github/v53 50.1.0 to 53.2.0 (#4146)
updated!

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-26 13:41:47 -03:00
Carlos Alexandro Becker
823bc6062d
feat: make git client support creating multiple files in a single commit (#4107)
extracted from #4081

a little bit of a better impl than there, actually...
2023-06-14 23:52:35 -03:00
Carlos Alexandro Becker
bbcc45b677
feat: support pull request templates (#4105)
check if there is a `.github/PULL_REQUEST_TEMPLATE.md` file, and use it
as body of the pull request if there is.

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-14 23:28:38 -03:00
Ville Skyttä
ef690d07ef
style: spelling and grammar fixes (#4069)
Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-06-05 13:08:57 -03:00
Carlos Alexandro Becker
f6b9ccbd8f
feat(github): allow to open PRs as drafts (#4054)
This allows to open a pull requests as a draft.

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-05-29 15:07:00 -03:00
Carlos Alexandro Becker
773cb91a7a
feat(github): allow to PR cross-repo (#4053)
This allows to open pull requests across repositories on nix, brew, krew
and scoop.

closes #4048

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-05-29 14:37:10 -03:00
Carlos Alexandro Becker
1f8a7b2fc5
feat(github): avoid rate limits (#4037)
before doing anything, check the `/rate_limits` API... if we have less
than 100 remaining, wait for the reset timer.

closes #4028
2023-05-27 00:15:43 -03:00
Carlos Alexandro Becker
dfcd535e31
fix: improve "pushing" logs for multiple publishers 2023-05-19 14:10:06 +00:00
Carlos Alexandro Becker
6fd5fd45ea
feat: improve output (#3966)
- log keys will be ordered as intended instead of sorted
- paths always relative to cwd

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2023-05-02 09:06:35 -03:00
Carlos Alexandro Becker
5bf42b726f
feat: publish taps, krews and scoops to regular git repositories (#3961)
basically redoing #3559 as it got impossible to merge with the many
changes since it was open (which is totally my fault for not merging it
earlier).

Anyhow, still a WIP, going also doing some other related improvements in
the way.

cc/ @graytonio

closes #3559
closes #3525

---------

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Co-authored-by: Grayton Ward <graytonio.ward@gmail.com>
2023-04-30 10:18:13 -03:00
Carlos Alexandro Becker
8b1c4ead60
feat: allow to PR homebrew taps (#3903)
closes #3485

also fixed a bug in file creation for github: it was always searching
for the file in the default branch

also, we don't need to create the file first, update does both create
and update.

TODO: implement the for krew, scoop, etc...

---------

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-04-06 22:58:06 -03:00
Carlos A Becker
98eb6a2e98
test: fix gitlab test
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-03-20 09:29:14 -03:00
Carlos A Becker
a459911f45
fix: many linting issues
refs #3874

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-03-19 22:17:18 -03:00
Carlos Alexandro Becker
f544c5ce69
test: testctx pkg (#3807)
alternative to #3806 

the idea is that both `context.New` and `context.Context{}` are never
used in tests.

not sure yet how much I like it, so far code does look a bit more
readable though.

---------

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2023-03-02 00:01:11 -03:00
Christoph Witzko
90d8324971
fix(gitlab): correctly prepend/append/keep releases notes (#3765)
Hi, I found a bug in the GitLab client that leads to not correctly
prepend/append/keep releases notes.

This will use the original `Description` instead of the pre-rendered
`DescriptionHTML`. Furthermore, as `include_html_description` is not
enabled, the `DescriptionHTML` field is always empty.

[GitLab
documentation](https://docs.gitlab.com/ee/api/releases/index.html#get-a-release-by-a-tag-name)
2023-02-07 11:19:19 -03:00
Carlos A Becker
71f3952f18
feat(deps): update go-github from v48 to v50 2023-01-26 23:36:02 -03:00
Carlos Alexandro Becker
da2335791a
fix: native changeloger without previous tag (#3668)
closes #3662

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-12-29 10:41:59 -03:00
Ochi Daiki
3734c2d9be
fix: check that the variable resp is not nil (#3670)
# If applied, this commit will

Linked issues will be resolved.

# Why is this change being made?

Because the program will no longer have to refer to nil.

# Provide links to any relevant tickets, URLs or other resources
- https://github.com/goreleaser/goreleaser/issues/3669
2022-12-29 09:29:15 -03:00
Carlos Alexandro Becker
50bd78439c
fix: log request-id on upload error and release create/update (#3608)
this should help when reporting issues to github, especially the magical
"failed successfully" error

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-11-29 21:38:39 -03:00
Carlos A Becker
78fa66ac7e
revert: unneeded release update
refs #3541
refs #3547

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-11-17 23:57:28 -03:00
Carlos A Becker
9a546a9782
test: internal/client/github tests
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-11-17 22:58:09 -03:00
Carlos Alexandro Becker
5731815e62
fix: improve github release code (#3547)
It makes no sense, but I saw it happens some times... the release will
be created as a draft, even though there's nothing telling it to do so.

Editing the release later might do the trick, hopefully.

closes #3541

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-11-17 22:57:42 -03:00
Carlos Alexandro Becker
1a69d44d6d
fix: allow to template scoop/brew/krew repo ref (#3521)
closes #3508

- adds template support for krew and scoop repo refs
- template branch on reporef on brew as well

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-11-02 14:54:16 -03:00
Carlos Alexandro Becker
afdb8e7a49
fix(deps): update to go-github v48 (#3475)
latest and greatest

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-10-19 09:53:23 -03:00
Carlos A Becker
11447a8990
test: fix 2022-10-01 00:05:11 -03:00
Carlos A Becker
cf06b08983
test: improve gitlab tests 2022-09-30 20:21:11 -03:00
Drew Stinnett
3cad812f73
fix: handle mixing of gitlab job and normal tokens (#3415)
If applied, this commit will allow for new GitLab clients to use both ci
job tokens and plain tokens (for things like brew publishing where the
CI_JOB_TOKEN isn't applicable)

This provides a fix for #3399

---

closes #3399

Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
2022-09-28 21:58:15 -03:00
Carlos Alexandro Becker
efdba10f58
fix: guard changelog commit abbrev behind config (#3349)
this allows the user to specify the abbrev lenght to use, and will also add the option to omit the commit hash altogether by setting it to -1.
default is doing nothing

closes #3348

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-08-30 12:04:01 -03:00
Carlos A Becker
fe3284285c
fix: github changeloger should use short commits 2022-08-22 22:34:48 -03:00
Carlos A Becker
0325b0485b
feat(deps): update go-github to v47
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-08-22 21:48:57 -03:00
Carlos A Becker
797a1ccc5f
feat: release with target_commitish in another repo
We should not imply the target_commitish, as some users might want to
have the code in one repo and the releases in another (e.g. private
code, public releases), so the commit might not be there.

We should instead allow the user to set the `target_commitish` (or not),
and pass it down to the github api.

refs 95bba02211
refs #3044
refs #3330

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-08-22 21:31:28 -03:00
Carlos A Becker
f81e32b489
chore: typo in method name 2022-08-21 16:05:00 -03:00
Carlos A Becker
abe63e37b7
fix: log deleted draft release
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-08-21 16:02:48 -03:00
Carlos Alexandro Becker
95bba02211
feat: delay github tag creation (#3330)
closes #3044
What happens is that, if the tag is created only locally, it'll create the tag in the remote upon creating the release. The tag still needs to be created locally though!
@bep let me know if that works for you.

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-08-21 15:52:10 -03:00
Carlos Alexandro Becker
a1e681c9ba
feat(deps): update github to v46 (#3326)
update to latest

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-08-21 10:55:41 -03:00
Carlos Alexandro Becker
aeccdb6a15
feat: replace existing draft releases on github (#3318)
* fix: duplicate draft release

* golint

* delete existed release assets before append draft

* feat: replace existing draft releases on github

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Co-authored-by:
Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
Co-authored-by: qsliu <qsliu2017@outlook.com>
2022-08-17 22:33:16 -03:00
Carlos Alexandro Becker
5cfc78d92c
feat: gitlab option to use_job_token (#2993) 2022-08-16 00:39:13 -03:00
Carlos Alexandro Becker
fe7e2123bd
feat: replacing the log library (#3139)
* feat: replacing logs

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* fix: tests et al

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* feat: update termenv/lipgloss

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* wip: output

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* fix: pin dep

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* fix: update

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* fix: tests

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* fix: tests

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* fix: deps

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>

* fix: dep

Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
2022-06-21 21:11:15 -03:00