-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add GitHub actions for CI and Release processes #20
Add GitHub actions for CI and Release processes #20
Conversation
.github/workflows/release.yaml
Outdated
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: release --skip-publish --rm-dist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As it is right now, it will NOT publish anything yet. We need to agree on how to proceed first.
go-version: 1.17 | ||
- | ||
name: Lint | ||
uses: golangci/golangci-lint-action@v2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you can see, now a linter will be run on every pull request and branch push. The same goes for the tests.
Hey @jossemarGT. I totally agree with the release process you suggest in this draft PR. Let's go to the next step. Would you create a Pull Request that is not a draft, and I will test with a dummy release. Thank you! |
3ce3e4e
to
bba7987
Compare
@@ -5,6 +5,8 @@ before: | |||
build: | |||
binary: revealgo | |||
main: cmd/revealgo/reveal.go | |||
ldflags: | |||
- -s -w -X github.com/yusukebe/revealgo.Version=v{{.Version}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you can see, now we are passing the version value as build flag. Meaning that we must create a git tag per each release otherwise it will not work as expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also see the change on version.go
to make this work
Hey @yusukebe , sorry for the delay. Everything has been sorted out. I tested it the goreleaser configurations against my own fork and it worked as expected; now it is only matter of testing it on your side. You will need to create a new git tag into this repository and wait for the github action to do its magic. PS: For external readers context, this feature already had been discussed on #11 |
Thank you @jossemarGT! I fixed some issues ( 1b67ba2, #22 ) , try to release by creating new tag, and it has been succeeded! Let's go this way. |
Oh my! 🤦♂️ @yusukebe those 2 configurations totally slip my mind, I was sure those were there. Anyhow, I am happy you were able to sort it out. |
Ok, this pull request was created as a draft on on purpose due to:
I think the fastest approach would be to let
gorelease
to create the release on GitHub by itself, this is supported by it out of the box. The relase will be triggered when a git tag is pushed, and this will be created as a draft or pre-release so you can manually change anything you like aftewards.What do you think? Should we go that way or do you have other idea?
And yes, you will need to test the process with a dummy release (ie: v1.1.1 or v1.2.0-pre)
PS: I will clean up the branch history after we agree on how to proceed.