Skip to content

Fix Homebrew Release#20

Merged
oldsj merged 15 commits intomainfrom
test-homebrew-release
Nov 30, 2023
Merged

Fix Homebrew Release#20
oldsj merged 15 commits intomainfrom
test-homebrew-release

Conversation

@oldsj
Copy link
Copy Markdown
Contributor

@oldsj oldsj commented Oct 13, 2023

Fixes the homebrew tap publish step of the release.
Once merged and a new release is created, the trailofbits/tools tap will be automatically updated.

I removed the RELEASE_TOKEN secret and replaced its use with the default GITHUB_TOKEN since that should be able to make a release, and we won't need to manage a personal token.
HOMEBREW_TOOLS_DEPLOY_KEY is an SSH deploy key configured at
https://github.com/trailofbits/homebrew-tools/settings/keys

Summary by CodeRabbit


  • Chore: Updated GitHub Actions workflow to use HOMEBREW_TOOLS_DEPLOY_KEY secret for PRIVATE_KEY environment variable and GITHUB_TOKEN secret for GITHUB_TOKEN environment variable.
  • Refactor: Modified Homebrew release configuration to replace source section with repository section, specifying the owner, name, git URL, and private key for the Homebrew repository. This change alters the source of the Homebrew formula.
  • Documentation: Updated README to reflect a change in command usage from cloudexec launch init to cloudexec init.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Oct 13, 2023

Image description CodeRabbit

Walkthrough

This update enhances the GitHub Actions workflow and Homebrew release configuration, while also updating the README to reflect a command usage change. The changes primarily involve the use of environment variables and secrets for deployment keys and tokens, and the modification of the Homebrew formula source.

Changes

File Summary
.github/workflows/release.yml Added PRIVATE_KEY environment variable using HOMEBREW_TOOLS_DEPLOY_KEY secret. Updated GITHUB_TOKEN environment variable to use GITHUB_TOKEN secret.
.goreleaser.yml Removed source section and replaced it with repository section specifying owner, name, git URL, and private key for the Homebrew repository.
README.md Updated command usage from cloudexec launch init to cloudexec init.

🐰💻

In the land of code where the shadows lie,

A rabbit hops, its gaze held high.

Secrets whispered, keys exchanged,

In the realm of bits, nothing stays unchanged.

Commands are tweaked, workflows refined,

In this digital burrow, treasures you'll find.

So raise your cups, let's toast and cheer,

For another day of coding without fear! 🥂🎉


Uplevel your code reviews with CodeRabbit Pro

CodeRabbit Pro

If you like this project, please support us by purchasing the Pro version. The Pro version has advanced context, superior noise reduction and several proprietary improvements compared to the open source version. Moreover, CodeRabbit Pro is free for open source projects.

Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Image description CodeRabbit

Commits Files that changed from the base of the PR and between e52c0d6 and ad4d48b commits.
Files selected (2)
  • .github/workflows/release.yml (2)
  • .goreleaser.yml (2)
Files skipped from review due to trivial changes (1)
  • .github/workflows/release.yml
Review comments generated (2)
  • Review: 2
  • LGTM: 0

Tips

Chat with Image description CodeRabbit Bot (@coderabbitai)

  • Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
  • Invite the bot into a review comment chain by tagging @coderabbitai in a reply.

Code suggestions

  • The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
  • You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.

Pausing incremental reviews

  • Add @coderabbitai: ignore anywhere in the PR description to pause further reviews from the bot.

Comment on lines 20 to 25
# ensures mod timestamp to be the commit timestamp
mod_timestamp: "{{ .CommitTimestamp }}"

source:
enabled: true
rlcp: true
archives:
- format: tar.gz
# this name template makes the OS and Arch compatible with the results of uname.
Copy link
Copy Markdown

@github-actions github-actions bot Oct 13, 2023

Choose a reason for hiding this comment

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

Image description CodeRabbit

The removal of the source section and its replacement with the archives section seems to be a significant change. However, without more context about how this configuration is used in your project, it's hard to say if this will cause any issues. Please ensure that this change aligns with your project's requirements for packaging and distribution.

- source:
-   enabled: true
-   rlcp: true
+ archives:
+   - format: tar.gz
+     # this name template makes the OS and Arch compatible with the results of uname.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixes goreleaser deprecation warnings

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Image description CodeRabbit

@oldsj Thank you for the clarification. If these changes are intended to address deprecation warnings from goreleaser, then it makes sense to update the configuration as you have done. Please ensure to test the release process thoroughly after these changes to confirm that everything still works as expected.

Comment on lines +49 to +54
- repository:
owner: trailofbits
name: homebrew-tools
token: "{{ .Env.GITHUB_TOKEN }}"
git:
url: [email protected]:trailofbits/homebrew-tools.git
private_key: "{{ .Env.PRIVATE_KEY }}"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Image description CodeRabbit

The changes made here seem to be correct as per the new Homebrew tap syntax. The repository field replaces the old tap field and the git field is used to specify the git URL and private key. Just make sure that the PRIVATE_KEY environment variable is properly set in your CI/CD pipeline.

-  - tap:
-       owner: trailofbits
-       name: homebrew-tools
-      token: "{{ .Env.GITHUB_TOKEN }}"
+  - repository:
+        owner: trailofbits
+        name: homebrew-tools
+       git:
+         url: [email protected]:trailofbits/homebrew-tools.git
+         private_key: "{{ .Env.PRIVATE_KEY }}"

@oldsj oldsj mentioned this pull request Oct 13, 2023
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Image description CodeRabbit

Commits Files that changed from the base of the PR and between ad4d48b and dd5ecde commits.
Files selected (1)
  • README.md (1)
Files skipped from review due to trivial changes (1)
  • README.md
Review comments generated (0)
  • Review: 0
  • LGTM: 0

Tips

Chat with Image description CodeRabbit Bot (@coderabbitai)

  • Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
  • Invite the bot into a review comment chain by tagging @coderabbitai in a reply.

Code suggestions

  • The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
  • You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.

Pausing incremental reviews

  • Add @coderabbitai: ignore anywhere in the PR description to pause further reviews from the bot.

@oldsj oldsj requested a review from bohendo October 13, 2023 12:34
@oldsj oldsj merged commit 37e1813 into main Nov 30, 2023
@oldsj oldsj deleted the test-homebrew-release branch November 30, 2023 15:55
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