8000 Automate release by Trojan295 · Pull Request #461 · capactio/capact · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Automate release #461

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

Merged
merged 51 commits into from
Sep 2, 2021
Merged

Automate release #461

merged 51 commits into from
Sep 2, 2021

Conversation

Trojan295
Copy link
Contributor
@Trojan295 Trojan295 commented Aug 26, 2021

Description

Changes proposed in this pull request:

  • Add workflow for releasing Capact
  • Use gren for release note generation

Testing

You would need to clone, change a few things and push it to your main brach

  1. Create an GitHub Environment named "Release" with two secrets:
    • GH_PAT - personal access token with permissions to commit to the repository
    • GCS_CREDS - base64 encoded GCP credentials in JSON format for GCS write access
  2. In .goreleaser.yml
    • Change release.github.owner to your username
    • Change blobs[0].bucket to a test bucket (you can use capactio-release-testing I used)
    • Change dockers[0].image_templates to point to your GHCR
  3. I also commented out most of the .github/workflows/branch-build.yaml, so I didn't have to deal with the images pushed there.
  4. In hack/release-charts.sh change CAPACTIO_OFFICIAL_BUCKET env to a test bucket (it must have a valid Helm repo index.yaml, you can use capactio-release-testing I used).

With these changes, you should be able to test the workflow. Trigger it from main and provide eg. 0.5.0 as the version. It should create a release commit on main, create a release branch release-0.5, push a commit with the Capact image SHA there and tag it. Also, a GitHub release should be created (the release notes will be empty, as your fork most probably does not have any merged PRs/issues).

You can also test a patch release scenario, by triggering the workflow from the release-0.5 branch and providing 0.5.1 version.

My runs:

Example release notes generated by gren - https://github.com/Trojan295/capact/releases/tag/untagged-a04325e324cfb3cb0597

Related issue(s)

Resolves #444

@Trojan295 Trojan295 marked this pull request as ready for review August 26, 2021 08:10
@Trojan295 Trojan295 added area/ci Relates to CI enhancement New feature or request labels Aug 26, 2021
@mszostok mszostok self-assigned this Aug 27, 2021
Copy link
Member
@mszostok mszostok left a comment

Choose a reason for hiding this comment

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

FYI: there is a typo in instruction: GITHUB_PAT -> GH_PAT

I saw that on your fork, branch build wasn't triggered, do you know why? On my fork, build was also not triggered. I tried also with the workflow_run and that would require splitting our make release workflow into two, so I abandoned that.

EDIT: somehow build was triggered now :D

Unfortunately, after 7 retries I was not able to run release successfully on my fork, I will discuss that offline :)

EDIT: After 10th execution and applied fixes finally I got it!

@mszostok
Copy link
Member

Do you have changelog generated for our repo which is not empty? Could you share it with me?

Example release notes generated by gren - https://github.com/Trojan295/capact/releases/tag/untagged-a04325e324cfb3cb0597

^ this doesn't work for me

Copy link
Member
@mszostok mszostok left a comment

Choose a reason for hiding this comment

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

Excelente 🚀
nice-excellent

@Trojan295 Trojan295 merged commit b17fa0a into capactio:main Sep 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci Relates to CI enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automate Capact release process
2 participants
0