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

ci: add sdist with vendor for release workflow #797

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

arthurzam
Copy link

OK, this is the first part for #793, the simplest one. This job will create a useful for distributions source tarball, which contains the code & go mod vendor run inside.

Required setup in configuration:

  1. Go to repository settings.
  2. In left sidebar choose "Environments"
  3. Click on add new environment
  4. name it release (this is the name I used here, you can choose another one and I'll modify it here)
  5. I recommend to setup Required reviewers and add yourself in there. When you create a new tag, you'll receive an email where you need to approve the run. It helps with accidental tag push before everything is pushed :)
  6. Click on "Save protection rules"

Workflow explanation:

  1. Triggered automatically (after approval) when you push tags that start with v, for example v1.51.0.
  2. checkouts and setups go1.19
  3. runs go mod vendor
  4. create a .tar.gz file containing a directory named redis_exporter-v${version}, under which all content is found including vendor/ dir.
  5. Create a new release on github, adds as asset the sdist, marks the release as draft. This is done so you can once again verify it, add release notes (for example changelog) and then manually publish.

I've tested this workflow on my fork, it generated this file redis_exporter-0.0.9999.tar.gz (yes, I used quite weird version)

My next step

Add another job to this workflow, which would build the binaries, and add them as assets to the same draft release.

Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
@coveralls
Copy link

Pull Request Test Coverage Report for Build 129

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 92.609%

Totals Coverage Status
Change from base Build 124: 0.0%
Covered Lines: 1917
Relevant Lines: 2070

💛 - Coveralls

@oliver006
Copy link
Owner

Thank you for the PR! ❤️
I'm really slammed this week but will hopefully get to reviewing it, probably by the end of this week or next, sorry about the delay.

@arthurzam
Copy link
Author

ping?

@oliver006
Copy link
Owner

ping?

I'm so sorry, I totally messed up and didn't get to reviewing this PR.
I'll try to find some time over the next 1-2 weeks to look at this and review it.
Again, my apologies.

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.

None yet

3 participants