mirror of
https://github.com/LukeHagar/usage-statistics.git
synced 2025-12-06 04:21:55 +00:00
Update author name to 'LukeHagar', add installation guide, enhance package.json with repository and keywords, and update README examples to reflect correct usage.
This commit is contained in:
2
.github/workflows/test-action.yml
vendored
2
.github/workflows/test-action.yml
vendored
@@ -30,7 +30,7 @@ jobs:
|
|||||||
run: bun run action:build
|
run: bun run action:build
|
||||||
|
|
||||||
- name: Test action with preview mode
|
- name: Test action with preview mode
|
||||||
uses: ./
|
uses: LukeHagar/usage-statistics@main
|
||||||
with:
|
with:
|
||||||
preview-mode: 'true'
|
preview-mode: 'true'
|
||||||
json-output-path: 'test-stats.json'
|
json-output-path: 'test-stats.json'
|
||||||
|
|||||||
97
INSTALLATION.md
Normal file
97
INSTALLATION.md
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
# Quick Installation Guide
|
||||||
|
|
||||||
|
## 🚀 Install the Usage Statistics Tracker
|
||||||
|
|
||||||
|
### Basic Installation
|
||||||
|
|
||||||
|
Add this to your GitHub Actions workflow:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- name: Usage Statistics Tracker
|
||||||
|
uses: LukeHagar/usage-statistics@v1
|
||||||
|
with:
|
||||||
|
config: 'production'
|
||||||
|
json-output-path: 'stats.json'
|
||||||
|
update-readme: 'true'
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Complete Example Workflow
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
name: Update Usage Statistics
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 0 * * *' # Daily at midnight
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update-stats:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Usage Statistics Tracker
|
||||||
|
uses: LukeHagar/usage-statistics@v1
|
||||||
|
with:
|
||||||
|
config: 'production'
|
||||||
|
json-output-path: 'stats.json'
|
||||||
|
csv-output-path: 'stats.csv'
|
||||||
|
report-output-path: 'docs/usage-report.md'
|
||||||
|
update-readme: 'true'
|
||||||
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Commit and push changes
|
||||||
|
run: |
|
||||||
|
git config user.name "github-actions[bot]"
|
||||||
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
|
git add stats.json stats.csv docs/usage-report.md README.md
|
||||||
|
git commit -m "chore: update usage statistics [skip ci]" || echo "No changes to commit"
|
||||||
|
git push
|
||||||
|
```
|
||||||
|
|
||||||
|
### README Integration
|
||||||
|
|
||||||
|
Add these markers to your README.md for automatic updates:
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
<!-- USAGE_STATS_START -->
|
||||||
|
## 📊 Usage Statistics
|
||||||
|
|
||||||
|
Last updated: 2025-07-29T18:53:52.619Z
|
||||||
|
|
||||||
|
### Summary
|
||||||
|
- **Total Downloads**: 414,533
|
||||||
|
- **Unique Packages**: 8
|
||||||
|
- **Platforms Tracked**: npm, pypi, homebrew, go
|
||||||
|
|
||||||
|
### Top Packages
|
||||||
|
1. **node** (homebrew) - 226,882 downloads
|
||||||
|
2. **git** (homebrew) - 153,281 downloads
|
||||||
|
3. **axios** (npm) - 18,397 downloads
|
||||||
|
4. **lodash** (npm) - 15,914 downloads
|
||||||
|
5. **github.com/go-chi/chi** (go) - 33 downloads
|
||||||
|
|
||||||
|
### Recent Activity
|
||||||
|
- **node** (homebrew) - 226,882 downloads on 7/29/2025
|
||||||
|
- **git** (homebrew) - 153,281 downloads on 7/29/2025
|
||||||
|
- **axios** (npm) - 722 downloads on 7/29/2025
|
||||||
|
- **lodash** (npm) - 857 downloads on 7/29/2025
|
||||||
|
- **axios** (npm) - 936 downloads on 7/28/2025
|
||||||
|
<!-- USAGE_STATS_END -->
|
||||||
|
```
|
||||||
|
|
||||||
|
## 📚 Documentation
|
||||||
|
|
||||||
|
- **Full Documentation**: [README.md](README.md)
|
||||||
|
- **Examples**: [examples/basic-usage.yml](examples/basic-usage.yml)
|
||||||
|
- **Repository**: [https://github.com/LukeHagar/usage-statistics](https://github.com/LukeHagar/usage-statistics)
|
||||||
|
|
||||||
|
## 🤝 Support
|
||||||
|
|
||||||
|
- **Issues**: [GitHub Issues](https://github.com/LukeHagar/usage-statistics/issues)
|
||||||
|
- **Discussions**: [GitHub Discussions](https://github.com/LukeHagar/usage-statistics/discussions)
|
||||||
|
- **Documentation**: [README.md](README.md)
|
||||||
@@ -66,6 +66,7 @@ git push origin v1.0.0
|
|||||||
#### Basic Information
|
#### Basic Information
|
||||||
- **Action name**: `usage-statistics-tracker`
|
- **Action name**: `usage-statistics-tracker`
|
||||||
- **Description**: `Track download statistics across multiple platforms (NPM, GitHub, PyPI, Homebrew, PowerShell, Postman, Go)`
|
- **Description**: `Track download statistics across multiple platforms (NPM, GitHub, PyPI, Homebrew, PowerShell, Postman, Go)`
|
||||||
|
- **Repository**: `LukeHagar/usage-statistics`
|
||||||
- **Category**: Choose `Data` or `Utilities`
|
- **Category**: Choose `Data` or `Utilities`
|
||||||
- **Icon**: Upload a relevant icon (512x512px PNG recommended)
|
- **Icon**: Upload a relevant icon (512x512px PNG recommended)
|
||||||
- **Color**: Choose a brand color (e.g., `#0366d6` for blue)
|
- **Color**: Choose a brand color (e.g., `#0366d6` for blue)
|
||||||
@@ -97,6 +98,7 @@ Add relevant keywords:
|
|||||||
#### Action Name
|
#### Action Name
|
||||||
- **Marketplace name**: `Usage Statistics Tracker`
|
- **Marketplace name**: `Usage Statistics Tracker`
|
||||||
- **Description**: `Comprehensive GitHub Action for tracking download statistics across multiple platforms with configurable outputs and README integration`
|
- **Description**: `Comprehensive GitHub Action for tracking download statistics across multiple platforms with configurable outputs and README integration`
|
||||||
|
- **Repository**: `LukeHagar/usage-statistics`
|
||||||
|
|
||||||
#### Categories
|
#### Categories
|
||||||
- **Primary category**: `Data`
|
- **Primary category**: `Data`
|
||||||
|
|||||||
16
README.md
16
README.md
@@ -18,7 +18,7 @@ A comprehensive GitHub Action for tracking download statistics across multiple p
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Usage Statistics Tracker
|
- name: Usage Statistics Tracker
|
||||||
uses: your-username/usage-statistics@v1
|
uses: LukeHagar/usage-statistics@v1
|
||||||
with:
|
with:
|
||||||
config: 'production'
|
config: 'production'
|
||||||
json-output-path: 'stats.json'
|
json-output-path: 'stats.json'
|
||||||
@@ -66,7 +66,7 @@ bun test
|
|||||||
#### Production Mode
|
#### Production Mode
|
||||||
```yaml
|
```yaml
|
||||||
- name: Usage Statistics Tracker
|
- name: Usage Statistics Tracker
|
||||||
uses: your-username/usage-statistics@v1
|
uses: LukeHagar/usage-statistics@v1
|
||||||
with:
|
with:
|
||||||
config: 'production'
|
config: 'production'
|
||||||
```
|
```
|
||||||
@@ -74,7 +74,7 @@ bun test
|
|||||||
#### Development Mode
|
#### Development Mode
|
||||||
```yaml
|
```yaml
|
||||||
- name: Usage Statistics Tracker
|
- name: Usage Statistics Tracker
|
||||||
uses: your-username/usage-statistics@v1
|
uses: LukeHagar/usage-statistics@v1
|
||||||
with:
|
with:
|
||||||
config: 'development'
|
config: 'development'
|
||||||
```
|
```
|
||||||
@@ -82,7 +82,7 @@ bun test
|
|||||||
#### Custom JSON Configuration
|
#### Custom JSON Configuration
|
||||||
```yaml
|
```yaml
|
||||||
- name: Usage Statistics Tracker
|
- name: Usage Statistics Tracker
|
||||||
uses: your-username/usage-statistics@v1
|
uses: LukeHagar/usage-statistics@v1
|
||||||
with:
|
with:
|
||||||
config: '{"npmPackages": ["lodash", "axios"], "githubRepositories": ["microsoft/vscode"]}'
|
config: '{"npmPackages": ["lodash", "axios"], "githubRepositories": ["microsoft/vscode"]}'
|
||||||
```
|
```
|
||||||
@@ -119,7 +119,7 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Usage Statistics Tracker
|
- name: Usage Statistics Tracker
|
||||||
uses: your-username/usage-statistics@v1
|
uses: LukeHagar/usage-statistics@v1
|
||||||
with:
|
with:
|
||||||
config: 'production'
|
config: 'production'
|
||||||
json-output-path: 'stats.json'
|
json-output-path: 'stats.json'
|
||||||
@@ -139,7 +139,7 @@ jobs:
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Usage Statistics Tracker
|
- name: Usage Statistics Tracker
|
||||||
uses: your-username/usage-statistics@v1
|
uses: LukeHagar/usage-statistics@v1
|
||||||
with:
|
with:
|
||||||
config: 'production'
|
config: 'production'
|
||||||
json-output-path: 'data/stats.json'
|
json-output-path: 'data/stats.json'
|
||||||
@@ -156,7 +156,7 @@ jobs:
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- name: Test Usage Statistics
|
- name: Test Usage Statistics
|
||||||
uses: your-username/usage-statistics@v1
|
uses: LukeHagar/usage-statistics@v1
|
||||||
with:
|
with:
|
||||||
preview-mode: 'true'
|
preview-mode: 'true'
|
||||||
json-output-path: 'test-stats.json'
|
json-output-path: 'test-stats.json'
|
||||||
@@ -170,7 +170,7 @@ jobs:
|
|||||||
```yaml
|
```yaml
|
||||||
- name: Usage Statistics Tracker
|
- name: Usage Statistics Tracker
|
||||||
id: stats
|
id: stats
|
||||||
uses: your-username/usage-statistics@v1
|
uses: LukeHagar/usage-statistics@v1
|
||||||
with:
|
with:
|
||||||
config: 'production'
|
config: 'production'
|
||||||
json-output-path: 'stats.json'
|
json-output-path: 'stats.json'
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
name: 'Usage Statistics Tracker'
|
name: 'Usage Statistics Tracker'
|
||||||
description: 'Track download statistics across multiple platforms (NPM, GitHub, PyPI, Homebrew, PowerShell, Postman, Go)'
|
description: 'Track download statistics across multiple platforms (NPM, GitHub, PyPI, Homebrew, PowerShell, Postman, Go)'
|
||||||
author: 'Your Name'
|
author: 'LukeHagar'
|
||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
# Configuration
|
# Configuration
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Usage Statistics Tracker
|
- name: Usage Statistics Tracker
|
||||||
uses: your-username/usage-statistics@v1
|
uses: LukeHagar/usage-statistics@v1
|
||||||
with:
|
with:
|
||||||
config: 'production'
|
config: 'production'
|
||||||
json-output-path: 'stats.json'
|
json-output-path: 'stats.json'
|
||||||
|
|||||||
26
package.json
26
package.json
@@ -1,7 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "usage-statistics",
|
"name": "usage-statistics",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "A Bun TypeScript script project",
|
"description": "A comprehensive GitHub Action for tracking download statistics across multiple platforms",
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/LukeHagar/usage-statistics.git"
|
||||||
|
},
|
||||||
|
"homepage": "https://github.com/LukeHagar/usage-statistics#readme",
|
||||||
"main": "src/index.ts",
|
"main": "src/index.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "bun run src/index.ts",
|
"start": "bun run src/index.ts",
|
||||||
@@ -23,5 +28,22 @@
|
|||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"bun": ">=1.0.0"
|
"bun": ">=1.0.0"
|
||||||
}
|
},
|
||||||
|
"keywords": [
|
||||||
|
"github-action",
|
||||||
|
"statistics",
|
||||||
|
"analytics",
|
||||||
|
"downloads",
|
||||||
|
"npm",
|
||||||
|
"github",
|
||||||
|
"pypi",
|
||||||
|
"homebrew",
|
||||||
|
"powershell",
|
||||||
|
"postman",
|
||||||
|
"go",
|
||||||
|
"tracking",
|
||||||
|
"usage"
|
||||||
|
],
|
||||||
|
"author": "LukeHagar",
|
||||||
|
"license": "MIT"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user