Search lyrics or song metadata from your terminal
genius genius-lyrics-search genius-lyrics cli rust

Add macOS aarch64 release workflow and cleanup

Add aarch64 toolchain, build, packaging, and release steps so both
x86_64 and aarch64 macOS binaries are published.

Update author contact in Cargo.toml and LICENSE. Replace the
unwrap-based GENIUS_TOKEN check with is_err to avoid panics. Tidy
ASCII art and remove some README badges and BuyMeACoffee button.

+38 -28
+28 -5
.github/workflows/release-for-mac.yml
··· 4 4 5 5 jobs: 6 6 release: 7 - name: release x86_64-apple-darwin 7 + name: release macOS binaries 8 8 runs-on: macos-latest 9 9 10 10 steps: 11 - - name: Installing Rust toolchain 11 + - name: Installing Rust toolchain for x86_64 12 12 uses: actions-rs/toolchain@v1 13 13 with: 14 14 toolchain: stable 15 15 target: x86_64-apple-darwin 16 16 override: true 17 + 18 + - name: Installing Rust toolchain for aarch64 19 + uses: actions-rs/toolchain@v1 20 + with: 21 + toolchain: stable 22 + target: aarch64-apple-darwin 23 + override: true 17 24 - name: Checking out sources 18 25 uses: actions/checkout@v1 19 - - name: Running cargo build 26 + - name: Running cargo build for x86_64 27 + uses: actions-rs/cargo@v1 28 + with: 29 + command: build 30 + toolchain: stable 31 + args: --locked --release --target x86_64-apple-darwin 32 + 33 + - name: Running cargo build for aarch64 20 34 uses: actions-rs/cargo@v1 21 35 with: 22 36 command: build 23 37 toolchain: stable 24 - args: --locked --release --target x86_64-apple-darwin" 38 + args: --locked --release --target aarch64-apple-darwin 25 39 - name: Set env 26 40 run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV 27 - - name: Packaging final binary 41 + - name: Packaging final binary for x86_64 28 42 shell: bash 29 43 run: | 30 44 cd target/x86_64-apple-darwin/release 31 45 tar czvf genius_${{ env.RELEASE_VERSION }}_x86_64-apple-darwin.tar.gz genius 32 46 shasum -a 512 genius_${{ env.RELEASE_VERSION }}_x86_64-apple-darwin.tar.gz > genius_${{ env.RELEASE_VERSION }}_x86_64-apple-darwin.tar.gz.sha512 47 + 48 + - name: Packaging final binary for aarch64 49 + shell: bash 50 + run: | 51 + cd target/aarch64-apple-darwin/release 52 + tar czvf genius_${{ env.RELEASE_VERSION }}_aarch64-apple-darwin.tar.gz genius 53 + shasum -a 512 genius_${{ env.RELEASE_VERSION }}_aarch64-apple-darwin.tar.gz > genius_${{ env.RELEASE_VERSION }}_aarch64-apple-darwin.tar.gz.sha512 33 54 - name: Releasing assets 34 55 uses: softprops/action-gh-release@v1 35 56 with: 36 57 files: | 37 58 target/x86_64-apple-darwin/release/genius_${{ env.RELEASE_VERSION }}_x86_64-apple-darwin.tar.gz 38 59 target/x86_64-apple-darwin/release/genius_${{ env.RELEASE_VERSION }}_x86_64-apple-darwin.tar.gz.sha512 60 + target/aarch64-apple-darwin/release/genius_${{ env.RELEASE_VERSION }}_aarch64-apple-darwin.tar.gz 61 + target/aarch64-apple-darwin/release/genius_${{ env.RELEASE_VERSION }}_aarch64-apple-darwin.tar.gz.sha512 39 62 env: 40 63 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+1 -1
Cargo.toml
··· 6 6 readme = "README.md" 7 7 repository = "https://github.com/tsirysndr/genius-cli" 8 8 license = "MIT" 9 - authors = ["Tsiry Sandratraina <tsiry.sndr@aol.com>", "James Choi <choijjames@gmail.com>"] 9 + authors = ["Tsiry Sandratraina <tsiry.sndr@rocksky.app>", "James Choi <choijjames@gmail.com>"] 10 10 categories = ["command-line-utilities"] 11 11 keywords = ["tokio", "lyrics", "cli", "genius"] 12 12
+1 -1
LICENSE
··· 1 - Copyright (c) 2022 Tsiry Sandratraina <tsiry.sndr@aol.com> 1 + Copyright (c) 2022 Tsiry Sandratraina <tsiry.sndr@rocksky.app> 2 2 3 3 Permission is hereby granted, free of charge, to any person obtaining a copy 4 4 of this software and associated documentation files (the "Software"), to deal
-12
README.md
··· 13 13 <a href="LICENSE" target="_blank"> 14 14 <img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-blue.svg" /> 15 15 </a> 16 - <a href="https://github.com/tsirysndr/genius-cli/actions/workflows/release.yml" target="_blank"> 17 - <img alt="License: MIT" src="https://github.com/tsirysndr/genius-cli/actions/workflows/release.yml/badge.svg" /> 18 - </a> 19 - <a href="https://github.com/tsirysndr/genius-cli/actions/workflows/rust-clippy.yml" target="_blank"> 20 - <img alt="release" src="https://github.com/tsirysndr/genius-cli/actions/workflows/rust-clippy.yml/badge.svg?branch=master" /> 21 - </a> 22 - </p> 23 - 24 - <p> 25 - <a href="https://www.buymeacoffee.com/tsiry"> 26 - <img src="https://cdn.buymeacoffee.com/buttons/v2/default-red.png" alt="Buy Me A Coffee" height="40" /> 27 - </a> 28 16 </p> 29 17 30 18 Genius CLI helps you search for lyrics or song informations from [Genius](https://genius.com), right from your terminal.
+8 -9
src/main.rs
··· 113 113 r#" 114 114 ______ _ ________ ____ 115 115 / ____/__ ____ (_)_ _______ / ____/ / / _/ 116 - / / __/ _ \/ __ \/ / / / / ___/ / / / / / / 117 - / /_/ / __/ / / / / /_/ (__ ) / /___/ /____/ / 118 - \____/\___/_/ /_/_/\__,_/____/ \____/_____/___/ 116 + / / __/ _ \/ __ \/ / / / / ___/ / / / / / / 117 + / /_/ / __/ / / / / /_/ (__ ) / /___/ /____/ / 118 + \____/\___/_/ /_/_/\__,_/____/ \____/_____/___/ 119 119 120 120 Genius CLI helps you search for lyrics or song informations from Genius.com. 121 - 121 + 122 122 "#, 123 123 ) 124 124 .subcommand_required(true) ··· 152 152 153 153 #[tokio::main] 154 154 async fn main() { 155 - if env::var("GENIUS_TOKEN").unwrap().is_empty() { 155 + if env::var("GENIUS_TOKEN").is_err() { 156 156 println!("Please set the GENIUS_TOKEN environment variable"); 157 157 exit(1); 158 158 } ··· 178 178 .unwrap() 179 179 .parse::<u32>() 180 180 .unwrap(); 181 - 182 - // Fetch lyrics from the new API 181 + 183 182 let url = format!("https://genius-mcp.xvzf.workers.dev/api/song/{}/lyrics", id); 184 183 let client = reqwest::Client::new(); 185 - 184 + 186 185 match client.get(&url).send().await { 187 186 Ok(response) => { 188 187 match response.json::<LyricsApiResponse>().await { ··· 193 192 &lyrics_data.title, 194 193 &lyrics_data.url 195 194 ); 196 - 195 + 197 196 // Print the lyrics 198 197 println!("{}", lyrics_data.lyrics); 199 198 }