diff --git a/README.md b/README.md index 06034aec..682f54c1 100644 --- a/README.md +++ b/README.md @@ -3,14 +3,14 @@ > Generate SVG cards summarizing a GitHub user's profile — written in Go. [![Marketplace](https://img.shields.io/badge/Marketplace-ghstats--cards-2f81f7?logo=github)](https://github.com/marketplace/actions/ghstats-cards) -[![Release](https://img.shields.io/github/v/release/tiennm99/ghstats-cards?color=blue)](https://github.com/tiennm99/ghstats-cards/releases/latest) -[![License](https://img.shields.io/github/license/tiennm99/ghstats-cards?color=green)](./LICENSE) +[![Release](https://img.shields.io/github/v/release/tiennm99/ghstats?color=blue)](https://github.com/tiennm99/ghstats/releases/latest) +[![License](https://img.shields.io/github/license/tiennm99/ghstats?color=green)](./LICENSE) `ghstats` is a single-binary CLI (and a GitHub Action wrapping it) that fetches data for a GitHub user and writes a themed set of SVGs you can embed in your profile README. -Marketplace listing: **[ghstats-cards](https://github.com/marketplace/actions/ghstats-cards)** · Source: [`tiennm99/ghstats-cards`](https://github.com/tiennm99/ghstats-cards) +Marketplace listing: **[ghstats-cards](https://github.com/marketplace/actions/ghstats-cards)** · Source: [`tiennm99/ghstats`](https://github.com/tiennm99/ghstats) Cards rendered: @@ -49,7 +49,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - - uses: tiennm99/ghstats-cards@v1 + - uses: tiennm99/ghstats@v1 with: user: ${{ github.repository_owner }} token: ${{ secrets.GHSTATS_TOKEN }} # classic PAT with read:user + repo @@ -96,13 +96,13 @@ Then embed the cards in your `README.md`: ## Use as a CLI ```sh -go install github.com/tiennm99/ghstats-cards@latest +go install github.com/tiennm99/ghstats@latest ``` Or build from source: ```sh -git clone https://github.com/tiennm99/ghstats-cards +git clone https://github.com/tiennm99/ghstats cd ghstats go build -o ghstats . ``` diff --git a/docs/deployment-guide.md b/docs/deployment-guide.md index 28989b63..229dc5b3 100644 --- a/docs/deployment-guide.md +++ b/docs/deployment-guide.md @@ -24,7 +24,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 - - uses: tiennm99/ghstats-cards@v1 + - uses: tiennm99/ghstats@v1 with: user: ${{ github.repository_owner }} token: ${{ secrets.GHSTATS_TOKEN }} @@ -77,7 +77,7 @@ Install: ```sh # Linux x86_64 example -curl -L https://github.com/tiennm99/ghstats-cards/releases/latest/download/ghstats_linux_amd64.tar.gz \ +curl -L https://github.com/tiennm99/ghstats/releases/latest/download/ghstats_linux_amd64.tar.gz \ | tar xz ./ghstats -user YOUR_USERNAME ``` @@ -85,21 +85,21 @@ curl -L https://github.com/tiennm99/ghstats-cards/releases/latest/download/ghsta ## 3. go install ```sh -go install github.com/tiennm99/ghstats-cards@latest +go install github.com/tiennm99/ghstats@latest ``` Requires Go 1.26+. Puts the binary in `$(go env GOPATH)/bin`. ## Docker image -Published to `ghcr.io/tiennm99/ghstats-cards:` on each `v*` release via `.github/workflows/release.yml` (buildx, multi-tag: exact version, major.minor, major, latest). +Published to `ghcr.io/tiennm99/ghstats:` on each `v*` release via `.github/workflows/release.yml` (buildx, multi-tag: exact version, major.minor, major, latest). The Action itself uses a runner-built image by default (`image: Dockerfile` in `action.yml`). To switch to the pre-built image for faster cold starts, edit `action.yml`: ```yaml runs: using: docker - image: docker://ghcr.io/tiennm99/ghstats-cards:v1 + image: docker://ghcr.io/tiennm99/ghstats:v1 ``` ## Release process @@ -113,7 +113,7 @@ runs: 5. **Marketplace publishing (one-time per repo):** GitHub only exposes the "Publish this Action to the GitHub Marketplace" toggle on the Release web UI — there is no CLI flag. Open the newly created release at - `https://github.com/tiennm99/ghstats-cards/releases/tag/vX.Y.Z/edit`, tick the + `https://github.com/tiennm99/ghstats/releases/tag/vX.Y.Z/edit`, tick the marketplace checkbox, accept the terms, and re-publish. Subsequent releases inherit marketplace visibility automatically. diff --git a/go.mod b/go.mod index fc920ee6..18d7eed6 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ -module github.com/tiennm99/ghstats-cards +module github.com/tiennm99/ghstats go 1.26 diff --git a/internal/card/card.go b/internal/card/card.go index 1c522393..47715a17 100644 --- a/internal/card/card.go +++ b/internal/card/card.go @@ -6,8 +6,8 @@ import ( "os" "path/filepath" - "github.com/tiennm99/ghstats-cards/internal/github" - "github.com/tiennm99/ghstats-cards/internal/theme" + "github.com/tiennm99/ghstats/internal/github" + "github.com/tiennm99/ghstats/internal/theme" ) // Card renders one SVG for a Profile under the given theme. diff --git a/internal/card/card_test.go b/internal/card/card_test.go index 03fbd0a4..91be3e37 100644 --- a/internal/card/card_test.go +++ b/internal/card/card_test.go @@ -6,8 +6,8 @@ import ( "strings" "testing" - "github.com/tiennm99/ghstats-cards/internal/github" - "github.com/tiennm99/ghstats-cards/internal/theme" + "github.com/tiennm99/ghstats/internal/github" + "github.com/tiennm99/ghstats/internal/theme" ) func TestRenderAll(t *testing.T) { diff --git a/internal/card/contributions.go b/internal/card/contributions.go index 1ba1f2d2..9f3dc0d7 100644 --- a/internal/card/contributions.go +++ b/internal/card/contributions.go @@ -5,8 +5,8 @@ import ( "strings" "time" - "github.com/tiennm99/ghstats-cards/internal/github" - "github.com/tiennm99/ghstats-cards/internal/theme" + "github.com/tiennm99/ghstats/internal/github" + "github.com/tiennm99/ghstats/internal/theme" ) type contributionsCard struct{} diff --git a/internal/card/donut_chart.go b/internal/card/donut_chart.go index c177f9cd..0c2aaa9d 100644 --- a/internal/card/donut_chart.go +++ b/internal/card/donut_chart.go @@ -5,8 +5,8 @@ import ( "math" "strings" - "github.com/tiennm99/ghstats-cards/internal/github" - "github.com/tiennm99/ghstats-cards/internal/theme" + "github.com/tiennm99/ghstats/internal/github" + "github.com/tiennm99/ghstats/internal/theme" ) // renderDonutCard draws a donut chart with a left-side legend. Shared by the diff --git a/internal/card/most_commit_language.go b/internal/card/most_commit_language.go index 6eda4fa0..b036385e 100644 --- a/internal/card/most_commit_language.go +++ b/internal/card/most_commit_language.go @@ -1,8 +1,8 @@ package card import ( - "github.com/tiennm99/ghstats-cards/internal/github" - "github.com/tiennm99/ghstats-cards/internal/theme" + "github.com/tiennm99/ghstats/internal/github" + "github.com/tiennm99/ghstats/internal/theme" ) type mostCommitLanguageCard struct{} diff --git a/internal/card/most_commit_language_all_time.go b/internal/card/most_commit_language_all_time.go index 4795ff3d..dec6962d 100644 --- a/internal/card/most_commit_language_all_time.go +++ b/internal/card/most_commit_language_all_time.go @@ -1,8 +1,8 @@ package card import ( - "github.com/tiennm99/ghstats-cards/internal/github" - "github.com/tiennm99/ghstats-cards/internal/theme" + "github.com/tiennm99/ghstats/internal/github" + "github.com/tiennm99/ghstats/internal/theme" ) type mostCommitLanguageAllTimeCard struct{} diff --git a/internal/card/productive.go b/internal/card/productive.go index 2fb2c151..cc0a5bc0 100644 --- a/internal/card/productive.go +++ b/internal/card/productive.go @@ -4,8 +4,8 @@ import ( "fmt" "strings" - "github.com/tiennm99/ghstats-cards/internal/github" - "github.com/tiennm99/ghstats-cards/internal/theme" + "github.com/tiennm99/ghstats/internal/github" + "github.com/tiennm99/ghstats/internal/theme" ) type productiveCard struct{} diff --git a/internal/card/profile.go b/internal/card/profile.go index d671a40a..d330d7a1 100644 --- a/internal/card/profile.go +++ b/internal/card/profile.go @@ -5,8 +5,8 @@ import ( "strings" "time" - "github.com/tiennm99/ghstats-cards/internal/github" - "github.com/tiennm99/ghstats-cards/internal/theme" + "github.com/tiennm99/ghstats/internal/github" + "github.com/tiennm99/ghstats/internal/theme" ) type profileCard struct{} diff --git a/internal/card/repos_per_language.go b/internal/card/repos_per_language.go index c8d0171e..efb1213f 100644 --- a/internal/card/repos_per_language.go +++ b/internal/card/repos_per_language.go @@ -1,8 +1,8 @@ package card import ( - "github.com/tiennm99/ghstats-cards/internal/github" - "github.com/tiennm99/ghstats-cards/internal/theme" + "github.com/tiennm99/ghstats/internal/github" + "github.com/tiennm99/ghstats/internal/theme" ) type reposPerLanguageCard struct{} diff --git a/internal/card/stats.go b/internal/card/stats.go index b679ba1b..40435eca 100644 --- a/internal/card/stats.go +++ b/internal/card/stats.go @@ -4,8 +4,8 @@ import ( "fmt" "strings" - "github.com/tiennm99/ghstats-cards/internal/github" - "github.com/tiennm99/ghstats-cards/internal/theme" + "github.com/tiennm99/ghstats/internal/github" + "github.com/tiennm99/ghstats/internal/theme" ) type statsCard struct{} diff --git a/main.go b/main.go index 5afe4c32..121f993b 100644 --- a/main.go +++ b/main.go @@ -11,9 +11,9 @@ import ( "syscall" "time" - "github.com/tiennm99/ghstats-cards/internal/card" - "github.com/tiennm99/ghstats-cards/internal/github" - "github.com/tiennm99/ghstats-cards/internal/theme" + "github.com/tiennm99/ghstats/internal/card" + "github.com/tiennm99/ghstats/internal/github" + "github.com/tiennm99/ghstats/internal/theme" ) func main() {