Skip to content
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

Merged
merged 2 commits into from
Oct 31, 2021

Conversation

jossemarGT
Copy link
Contributor

@jossemarGT jossemarGT commented Oct 24, 2021

Ok, this pull request was created as a draft on on purpose due to:

  1. When a contributor adds a github action, I recall the maintainer must approve it first, berfore it start working.
  2. I need to discuss some details about how do you (@yusukebe) imagine the release process should look like.

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.

with:
distribution: goreleaser
version: latest
args: release --skip-publish --rm-dist
Copy link
Contributor Author

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
Copy link
Contributor Author

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.

@yusukebe
Copy link
Owner

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!

@jossemarGT jossemarGT marked this pull request as ready for review October 30, 2021 21:02
@@ -5,6 +5,8 @@ before:
build:
binary: revealgo
main: cmd/revealgo/reveal.go
ldflags:
- -s -w -X github.com/yusukebe/revealgo.Version=v{{.Version}}
Copy link
Contributor Author

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.

Copy link
Contributor Author

@jossemarGT jossemarGT Oct 30, 2021

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

@jossemarGT
Copy link
Contributor Author

jossemarGT commented Oct 30, 2021

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.

Screenshot_20211030_143907

PS: For external readers context, this feature already had been discussed on #11

@yusukebe yusukebe merged commit f656c8c into yusukebe:master Oct 31, 2021
@yusukebe
Copy link
Owner

yusukebe commented Oct 31, 2021

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.

@jossemarGT jossemarGT deleted the feature/add-github-actions branch October 31, 2021 18:44
@jossemarGT
Copy link
Contributor Author

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.

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