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 Release Workflow and Build Script for Automated Releases #190

Merged
merged 13 commits into from
Jun 5, 2023

Conversation

maxlambrecht
Copy link
Contributor

Pull request check list

  • Proper tests/regressions included?
  • Documentation updated?

Affected functionality

Description of change

This pull request introduces two new files that automate the release process for the Galadriel project. These additions will streamline the creation and publishing of new releases, ensuring that they are consistent, reliable, and require minimal manual intervention.

  • GitHub Release Workflow release_build.yaml: This GitHub Actions workflow is triggered whenever a new version tag (formatted as vX.Y.Z) is pushed to the repository. The workflow sets up the Go environment, checks out the code, downloads dependencies, runs tests, and builds the project's artifacts using the provided build script. It then creates a new GitHub release and uploads the built artifacts and their SHA-256 checksums to it. The workflow is designed to run on an Ubuntu-latest environment.

  • Build Artifacts Script build_artifacts.sh: This bash script is responsible for building the Galadriel project's artifacts. It supports building for two architectures: amd64 and arm64. For each architecture, it builds the galadriel-server and galadriel-harvester binaries, packages them along with the LICENSE and configuration files into a tarball, and generates a SHA-256 checksum for the tarball. The script is designed to halt on the first error encountered to prevent the propagation of build errors.

Which issue this pull requests fixes

.github/workflows/release_build.yaml Fixed Show fixed Hide fixed
.github/workflows/release_build.yaml Fixed Show fixed Hide fixed
.github/workflows/release_build.yaml Fixed Show fixed Hide fixed
.github/workflows/release_build.yaml Show resolved Hide resolved
Copy link
Collaborator

@Victorblsilveira Victorblsilveira left a comment

Choose a reason for hiding this comment

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

Just some comments and possible improvements.

.github/workflows/release_build.yaml Show resolved Hide resolved
.github/workflows/scripts/build_artifacts.sh Outdated Show resolved Hide resolved
needs: build
runs-on: ubuntu-latest
permissions:
contents: write

Check failure

Code scanning / Scorecard

Token-Permissions

score is 9: jobLevel 'contents' permission set to 'write' Remediation tip: Verify which permissions are needed and consider whether you can reduce them. Click Remediation section below for further remediation help
Signed-off-by: Max Lambrecht <[email protected]>
Signed-off-by: Max Lambrecht <[email protected]>
Signed-off-by: Max Lambrecht <[email protected]>
Signed-off-by: Max Lambrecht <[email protected]>
Signed-off-by: Max Lambrecht <[email protected]>
Signed-off-by: Max Lambrecht <[email protected]>
Signed-off-by: Max Lambrecht <[email protected]>
Signed-off-by: Max Lambrecht <[email protected]>
Signed-off-by: Max Lambrecht <[email protected]>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 2, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@maxlambrecht maxlambrecht merged commit a7b8f85 into HewlettPackard:main Jun 5, 2023
@maxlambrecht maxlambrecht deleted the add-release branch June 5, 2023 15:51
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.

3 participants