oliver006 / redis_exporter

Prometheus Exporter for ValKey & Redis Metrics. Supports ValKey and Redis 2.x, 3.x, 4.x, 5.x, 6.x, and 7.x
https://github.com/oliver006/redis_exporter
MIT License
3.04k stars 860 forks source link

ci: add sdist with vendor for release workflow #797

Open arthurzam opened 1 year ago

arthurzam commented 1 year ago

OK, this is the first part for https://github.com/oliver006/redis_exporter/issues/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.

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 129


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

💛 - Coveralls
oliver006 commented 1 year ago

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 commented 6 months ago

ping?

oliver006 commented 6 months ago

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.

arthurzam commented 3 days ago

ping?