Skip to content

feat(workflows): add goreleaser - #748

Open
stauersbol wants to merge 32 commits into
ayn2op:mainfrom
stauersbol:feat/goreleaser
Open

stauersbol wants to merge 32 commits into
ayn2op:mainfrom
stauersbol:feat/goreleaser

Conversation

@stauersbol

Copy link
Copy Markdown

Simply adds goreleaser, there is a bunch of defaults and some things are locked behind their pro plan, but might not be necessarily useful things.

There could be some debate on the .goreleaser.yaml config file, but I'm all ears on that part.
It defaults to prerelease as this was a request from ayyan.

Feel free to go read through the docs at: https://goreleaser.com/customization/

Comment thread .goreleaser.yaml Outdated
Comment thread .goreleaser.yaml Outdated
Comment thread .goreleaser.yaml
Comment thread .goreleaser.yaml Outdated
@stauersbol

Copy link
Copy Markdown
Author

looks like i forgot to setup signed commits, will have to do that

@stauersbol

Copy link
Copy Markdown
Author

should all be signed now after amending them

@ayn2op

ayn2op commented Feb 16, 2026

Copy link
Copy Markdown
Owner

@stauersbol

Copy link
Copy Markdown
Author

goreleaser/goreleaser-cross

yep that was the plan to use, didnt have time to look into it yesterday, plan is doing so day.

@stauersbol

Copy link
Copy Markdown
Author

@ayn2op need you opinion on some bits, ive added comments to what im unsure about. for the most part dry-run works.

I believe there is still some configuration left and I might just nuke the custom name templating I did, as it makes the life of packagers easier on AUR and such.

@stauersbol

Copy link
Copy Markdown
Author

I might also consider adding linux arm64 and arm64hf (in case pi users would like to use it)

Comment thread .goreleaser.yaml Outdated
Comment thread .goreleaser.yaml
Comment thread .goreleaser.yaml Outdated
Comment thread .goreleaser.yaml Outdated
Comment thread .goreleaser.yaml Outdated
Comment thread .github/workflows/go-releaser.yml Outdated
Comment thread .goreleaser.yaml Outdated
Comment thread .goreleaser.yaml Outdated
Comment thread .github/workflows/go-releaser.yml Outdated
@stauersbol

Copy link
Copy Markdown
Author

alright touched the points you had @ayn2op, i also went ahead to add linux arm64 and armv7 build targets, since it could be relevant if some users of those 2 ISAs appear.

@stauersbol

Copy link
Copy Markdown
Author

Though there is something with how changelog works, unsure how it works under CI conditions, but it may overwrite any auto generated changelog notes on a release, but it might be worth the initial try and then adjust if it does indeed overwrite

@stauersbol

Copy link
Copy Markdown
Author

simplified the build targets in the config and also added some docs in the readme that describes goreleaser

@ayn2op ayn2op linked an issue Apr 5, 2026 that may be closed by this pull request
@stauersbol

stauersbol commented Jul 5, 2026 •

Copy link
Copy Markdown
Author

Alright finally got time to clean up a little. I removed a merge commit, as they tend to not be good for git history.

I have removed the Dockerfile as that is not needed as we are now purego(cgo free) with a recent update to a dependency.

@ayn2op ready for whenever you choose to look at this again, no rush on your end of cource :)

EDIT: note to a potential nit, I left a static variable in the Makefile as it might be relevant if we chose, before merging this, to just set a version of goreleaser-cross and then update with small PRs down the line, open for both, left it on latest as that is what I had it set to in the Dockerfile.

Comment thread .goreleaser.yaml
Comment thread .goreleaser.yaml Outdated
@stauersbol
stauersbol requested a review from ayn2op July 14, 2026 14:55
@stauersbol

stauersbol commented Jul 14, 2026 •

Copy link
Copy Markdown
Author

@ayn2op im guessing we still need to use goreleaser-cross, but the makefile as you pointed out is not needed anymore. I have removed that and cleaned up all the cgo magic stuff as the dep that required it is now purego, but idk if there is a slight security issue with how I'm currently passing in the GITHUB_TOKEN to the docker run command? If there is then I'm more than happy for feedback on that part

stauersbol and others added 2 commits July 14, 2026 17:02
Signed-off-by: Lukas Stauersbøl <9026132+stauersbol@users.noreply.github.com>
@stauersbol

Copy link
Copy Markdown
Author

fixed a merge conflict

Comment on lines +16 to +25
- name: release publish
run: |
docker run \
--rm \
-e 'GITHUB_TOKEN=${{secrets.GITHUB_TOKEN}}' \
-v /var/run/docker.sock:/var/run/docker.sock \
-v `pwd`:/go/src/github.com/ayn2op/discordo \
-w /go/src/github.com/ayn2op/discordo \
ghcr.io/goreleaser-cross:latest \
release --clean

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like previously stated, discordo no longer relies on CGO to compile, so goreleaser-cross setup can be completely removed.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah woops my bad, will adjust later today

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd recommend running goreleaser init again and going from there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants