From 09f199b8690b00b1ce1e294b42c819999a81f14f Mon Sep 17 00:00:00 2001 From: narcis96 Date: Thu, 11 Apr 2024 10:53:24 +0300 Subject: [PATCH] (capi): add release instructions --- Release.md | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 Release.md diff --git a/Release.md b/Release.md new file mode 100644 index 000000000..bf4b21f4e --- /dev/null +++ b/Release.md @@ -0,0 +1,70 @@ +This document outlines how to set up and execute releases on GitHub for the loft-sh/cluster-api-provider-vcluster repository using the provided GitHub Actions workflow file. The workflow is designed to automate the release process, including setting up the environment, preparing release files, publishing images, and creating or editing a release. + +# Workflow Overview + +The workflow is triggered whenever a release is created on GitHub and is based on three main jobs: + +publish-capi-yamls: Prepares and publishes the release files. +publish-images: Builds and pushes Docker images. +publish-release: Creates or updates the GitHub release. + +# Details of Workflow Steps + +## 1. publish-capi-yamls + +- Trigger: When a tag starting with v is pushed. +- Environment: Runs on Ubuntu 18.04. +- Main Steps: + - Setup Go 1.22. + - Checkout the code. + - Extract the release version from the tag. + - Prepare the release files using make release. + - Upload the prepared release assets. + - Attach assets to the GitHub release. + +## 2. publish-images + +- Trigger: Same as publish-capi-yamls. +- Environment: Runs on Ubuntu 18.04. + +- Main Steps: + - Setup Docker and QEMU for cross-platform build support. + - Login to DockerHub. + - Build and push Docker images. + - Output the images' digests. + +## 3. publish-release + +- Trigger: Needs successful completion of publish-images. +- Environment: Runs on Ubuntu 18.04. +- Main Steps: + - Checkout the repository. + - Extract the release version. + - Set up Hub CLI for GitHub. + - Fetch tags from the origin. + - Create or update the GitHub release with the extracted version. + +# Usage Instructions + +- Prepare the Release: + - Ensure that your code changes are merged into the main branch. + - Tag the release with a version number, prefixed with v. For example, v1.0.0. + +- Push the Tag to GitHub: + - Push the tag to GitHub using git push origin . + - This will trigger the GitHub Actions workflow. + +- Monitor the Workflow: + - Check the Actions tab in the GitHub repository to monitor the progress. + - If any step fails, the subsequent steps will not execute. + +- Check the Release: + - Once the workflow completes, verify the release in the "Releases" section of the GitHub repository. + - Ensure the assets and Docker images are correctly published. + +- Troubleshooting: + - If any issues arise, check the logs of the GitHub Actions workflow for detailed error messages. + - Correct any issues and rerun the workflow if necessary. + +- Manual Intervention (if needed): + - If automatic processes fail, you may need to manually attach assets or create/edit the release on GitHub. \ No newline at end of file