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

chore: upgrade goreleaser to latest version #59

Merged
merged 1 commit into from
Sep 19, 2024
Merged

Conversation

jamestelfer
Copy link
Owner

@jamestelfer jamestelfer commented Sep 19, 2024

We're looking to introduce signing with Cosign, something that's supported from 2.2 onwards. Also, well, upgrades.

Summary by CodeRabbit

  • New Features

    • Upgraded the release workflow to utilize the latest version of the GoReleaser action, potentially enhancing deployment capabilities.
    • Introduced a new configuration version in the GoReleaser setup, allowing for improved support and features.
  • Chores

    • Made minor stylistic adjustments to the release workflow configuration.

Copy link

coderabbitai bot commented Sep 19, 2024

Walkthrough

The pull request introduces updates to two configuration files related to the release process. The .github/workflows/release.yaml file has been modified to include a stylistic change in the environment key and an upgrade of the goreleaser/goreleaser-action version from v1.25.1 to v2.3.2. The .goreleaser.yaml file has been updated to include a new version key set to 2, indicating an update to the configuration schema.

Changes

File Change Summary
.github/workflows/release.yaml Updated environment key to use quotes and upgraded goreleaser/goreleaser-action from v1.25.1 to v2.3.2.
.goreleaser.yaml Added new key version with value 2 to indicate an update to the configuration schema.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant GitHub
    participant GoReleaser

    User->>GitHub: Initiates release process
    GitHub->>GoReleaser: Triggers goreleaser action
    GoReleaser-->>GitHub: Executes build and release
Loading

Poem

🐰 In the meadow where changes bloom,
A new version hops, dispelling gloom.
With quotes and upgrades, we dance with glee,
GoReleaser's magic, as bright as can be!
Let’s celebrate with a joyful cheer,
For every release brings us near! 🌼


Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 0086f84 and be25afc.

Files selected for processing (2)
  • .github/workflows/release.yaml (2 hunks)
  • .goreleaser.yaml (1 hunks)
Additional comments not posted (3)
.github/workflows/release.yaml (2)

15-15: LGTM!

The change to use quotes around the environment value is a valid stylistic improvement. It does not affect the functionality of the workflow.


40-40: Verify compatibility with the new version of the goreleaser/goreleaser-action.

Upgrading from v1.25.1 to v2.3.2 is a significant version jump. While the rest of the workflow configuration seems to be compatible with the newer version, it's important to:

  1. Review the changelog to understand the changes between these versions and check for any breaking changes or deprecated features that might affect the release process.

  2. Thoroughly test the release process with the new version of the action to ensure it works as expected.

Do you want me to help verify the compatibility of the workflow with the new version of the action? I can review the changelog and generate a test script to validate the release process.

.goreleaser.yaml (1)

2-2: Verify compatibility with the project's requirements and dependencies.

Upgrading the GoReleaser configuration schema to version 2 is a significant change that could introduce breaking changes or new features. While the change itself looks good, it's crucial to ensure that the new configuration version is compatible with the project's requirements and dependencies.

Please run the following script to verify the compatibility:

If the script reports any incompatibilities, please update the project's dependencies accordingly.

Verification successful

Compatibility with GoReleaser v2 confirmed

The upgrade to GoReleaser configuration schema version 2 is compatible with the project's setup and dependencies. Here's a summary of the findings:

  • The project uses Go 1.22.3, which is compatible with GoReleaser v2.
  • The CI configuration uses goreleaser/goreleaser-action@v5, which supports GoReleaser v2.
  • The .goreleaser.yaml file is already structured for version 2 and includes modern features like kos for multi-platform Docker image building.
  • No direct dependencies on GoReleaser were found in the project, which is expected for a build tool.

The change to version 2 in the .goreleaser.yaml file aligns with the project's current setup and should not introduce any compatibility issues.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash

# Check the version of GoReleaser used in the project
goreleaser_version=$(goreleaser --version)

# Check if the project's Go version is compatible with GoReleaser version 2
go_version=$(go version)

echo "GoReleaser version: $goreleaser_version"
echo "Go version: $go_version"

# Check if the project's dependencies are compatible with GoReleaser version 2
go mod tidy
if [ $? -ne 0 ]; then
  echo "Error: Incompatible dependencies found. Please update the dependencies to ensure compatibility with GoReleaser version 2."
else
  echo "Dependencies are compatible with GoReleaser version 2."
fi

Length of output: 665


Script:

#!/bin/bash

# Check for Go version in go.mod file
echo "Checking Go version in go.mod:"
cat go.mod | grep -E "^go [0-9]+\.[0-9]+(\.[0-9]+)?"

# Check for GoReleaser version in CI/CD config files
echo -e "\nChecking for GoReleaser version in CI/CD configs:"
grep -r "goreleaser" .github/workflows/* .gitlab-ci.yml .circleci/config.yml 2>/dev/null

# List project dependencies
echo -e "\nListing project dependencies:"
cat go.mod | sed -n '/^require/,/)/p'

# Check for any GoReleaser config files
echo -e "\nChecking for GoReleaser config files:"
find . -name ".goreleaser.y*ml" -o -name "goreleaser.y*ml"

# Display content of GoReleaser config file
echo -e "\nDisplaying content of GoReleaser config file:"
cat .goreleaser.yaml

Length of output: 6108


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    -- I pushed a fix in commit <commit_id>, please review it.
    -- Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    -- @coderabbitai generate unit testing code for this file.
    -- @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    -- @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    -- @coderabbitai read src/utils.ts and generate unit testing code.
    -- @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    -- @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

codecov bot commented Sep 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.40%. Comparing base (80a0289) to head (be25afc).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #59   +/-   ##
=======================================
  Coverage   90.40%   90.40%           
=======================================
  Files          13       13           
  Lines         521      521           
=======================================
  Hits          471      471           
  Misses         34       34           
  Partials       16       16           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jamestelfer jamestelfer merged commit f41696e into main Sep 19, 2024
5 of 6 checks passed
@jamestelfer jamestelfer deleted the goreleaser-upgrade branch September 21, 2024 05:04
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.

1 participant