-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Publish to Homebrew and bump version to 0.1.101
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
Showing
6 changed files
with
66 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,10 @@ on: | |
permissions: | ||
contents: write | ||
packages: write | ||
pull-requests: write | ||
actions: read | ||
checks: write | ||
repositories: write | ||
|
||
jobs: | ||
build-and-release: | ||
|
@@ -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 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,5 +46,5 @@ | |
"postinstall": "chmod +x index.js", | ||
"start": "node index.js" | ||
}, | ||
"version": "0.1.100" | ||
"version": "0.1.101" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.1.100 | ||
0.1.101 |