Skip to content

Commit

Permalink
homebrew
Browse files Browse the repository at this point in the history
  • Loading branch information
dagou committed Sep 9, 2024
1 parent ca293c5 commit a1cfc24
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ env:
PROJECT_NAME: clade
REPO_NAME: ${{ github.repository }}
BREW_TAP: eric9n/homebrew-tap
DESC: "A tool for phylogenetic tree construction and pruning based on NCBI taxonomy data and GTDB (Genome Taxonomy Database) data."

jobs:
dist:
Expand Down Expand Up @@ -159,6 +160,7 @@ jobs:
VERSION=${{ steps.extract-version.outputs.tag-name }}
REPO=${{ env.REPO_NAME }}
PROJECT=${{ env.PROJECT_NAME }}
DESC=${{ env.DESC }}
X86_64_URL="https://github.com/${REPO}/releases/download/${VERSION}/${PROJECT}-${VERSION}-x86_64-apple-darwin"
AARCH64_URL="https://github.com/${REPO}/releases/download/${VERSION}/${PROJECT}-${VERSION}-aarch64-apple-darwin"
Expand All @@ -168,7 +170,7 @@ jobs:
cat > Formula/${PROJECT}.rb <<EOL
class $(echo $PROJECT | perl -pe 's/(^|-)(\w)/\U$2/g') < Formula
desc "A tool for phylogenetic tree construction and pruning based on NCBI taxonomy data and GTDB (Genome Taxonomy Database) data."
desc "${DESC}"
homepage "https://github.com/${REPO}"
version "${VERSION}"
Expand All @@ -183,7 +185,14 @@ jobs:
end
def install
bin.install "${PROJECT}"
if Hardware::CPU.intel?
bin.install "${PROJECT}-#{version}-x86_64-apple-darwin" => "${PROJECT}"
else
bin.install "${PROJECT}-#{version}-aarch64-apple-darwin" => "${PROJECT}"
end
end
test do
system "#{bin}/${PROJECT}", "--version"
end
end
EOL
Expand Down

0 comments on commit a1cfc24

Please sign in to comment.