Skip to content

Commit

Permalink
feat: Publish to Homebrew and bump version to 0.1.101
Browse files Browse the repository at this point in the history
This commit introduces a new workflow to publish aicommit to Homebrew, making it easier for macOS and Linux users to install the tool. Additionally, the version has been bumped to 0.1.101 across all relevant files.
  • Loading branch information
suenot committed Feb 1, 2025
1 parent 74db3d9 commit d3803f4
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 5 deletions.
57 changes: 56 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
permissions:
contents: write
packages: write
pull-requests: write
actions: read
checks: write
repositories: write

jobs:
build-and-release:
Expand Down Expand Up @@ -273,4 +277,55 @@ jobs:
- name: Publish to npm
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

publish-homebrew:
needs: [build-macos-x86, build-macos-arm]
runs-on: ubuntu-latest
steps:
- name: Checkout tap repo
uses: actions/checkout@v4
with:
repository: suenot/homebrew-tap
path: homebrew-tap
token: ${{ secrets.GITHUB_TOKEN }}

- name: Download macOS binaries
uses: actions/download-artifact@v4
with:
pattern: binaries-macos-*
path: dist/

- name: Calculate SHA256
id: sha-calc
run: |
SHA=$(sha256sum dist/aicommit-macos-x86_64 | awk '{ print $1 }')
echo "sha256=$SHA" >> $GITHUB_OUTPUT
- name: Update formula
env:
VERSION: ${{ github.ref_name }}
SHA256: ${{ steps.sha-calc.outputs.sha256 }}
run: |
cat > homebrew-tap/Formula/aicommit.rb <<EOL
class Aicommit < Formula
desc "AI-powered commit message generator"
homepage "https://github.com/suenot/aicommit"
url "https://github.com/suenot/aicommit/releases/download/${VERSION}/aicommit-macos-x86_64"
sha256 "${SHA256}"
license "MIT"
def install
bin.install "aicommit-macos-x86_64" => "aicommit"
end
end
EOL
- name: Commit and push
run: |
cd homebrew-tap
git config user.name "GitHub Actions"
git config user.email "[email protected]"
git add Formula/aicommit.rb
git commit -m "Update aicommit to ${{ github.ref_name }}"
git push
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "aicommit"
version = "0.1.100"
version = "0.1.101"
edition = "2021"
authors = ["Eugen Soloviov <[email protected]>"]
description = "A CLI tool that generates concise and descriptive git commit messages using LLMs"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@
"postinstall": "chmod +x index.js",
"start": "node index.js"
},
"version": "0.1.100"
"version": "0.1.101"
}
6 changes: 6 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ Legend:

There are several ways to install aicommit:

### Homebrew (macOS/Linux)
```bash
brew tap suenot/tap
brew install aicommit
```

### Using Cargo (Rust package manager)

If you have Rust installed:
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.100
0.1.101

0 comments on commit d3803f4

Please sign in to comment.