Polish README with badges and mermaid diagrams, add release infrastructure
All checks were successful
Release / release (push) Successful in 5s
All checks were successful
Release / release (push) Successful in 5s
Rewrite README with centered header, shields.io badges, mermaid topology and session key diagrams, restructured installation section with Windows quick start guide, and release documentation. Add CHANGELOG.md for v0.2.0 and Gitea Actions release workflow that builds source archives (tar.gz + zip) and publishes them on tag push. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
81
.gitea/workflows/release.yml
Normal file
81
.gitea/workflows/release.yml
Normal file
@@ -0,0 +1,81 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Extract version from tag
|
||||
id: version
|
||||
run: echo "VERSION=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Build source archives
|
||||
run: |
|
||||
PROJECT="claude-statusline-${{ steps.version.outputs.VERSION }}"
|
||||
|
||||
# Files to include in the release archives
|
||||
INCLUDE=(
|
||||
statusline.js
|
||||
fetch-usage.js
|
||||
install.sh
|
||||
install.ps1
|
||||
install_wizard.py
|
||||
package.json
|
||||
requirements.txt
|
||||
README.md
|
||||
CHANGELOG.md
|
||||
LICENSE
|
||||
.gitattributes
|
||||
claude_usage_widget/__init__.py
|
||||
claude_usage_widget/__main__.py
|
||||
claude_usage_widget/app.py
|
||||
claude_usage_widget/config.py
|
||||
claude_usage_widget/fetcher.py
|
||||
claude_usage_widget/menu.py
|
||||
claude_usage_widget/renderer.py
|
||||
)
|
||||
|
||||
mkdir -p "dist/${PROJECT}/claude_usage_widget"
|
||||
|
||||
for f in "${INCLUDE[@]}"; do
|
||||
[ -f "$f" ] && cp "$f" "dist/${PROJECT}/$f"
|
||||
done
|
||||
|
||||
# tar.gz for Linux / macOS
|
||||
tar -czf "dist/${PROJECT}.tar.gz" -C dist "${PROJECT}"
|
||||
|
||||
# zip for Windows
|
||||
cd dist && zip -r "${PROJECT}.zip" "${PROJECT}" && cd ..
|
||||
|
||||
- name: Create release and upload assets
|
||||
env:
|
||||
TAG: ${{ github.ref_name }}
|
||||
VERSION: ${{ steps.version.outputs.VERSION }}
|
||||
TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
||||
GITEA_URL: ${{ github.server_url }}
|
||||
REPO: ${{ github.repository }}
|
||||
run: |
|
||||
API="${GITEA_URL}/api/v1/repos/${REPO}"
|
||||
|
||||
# Create the release
|
||||
RELEASE_ID=$(curl -s -X POST "${API}/releases" \
|
||||
-H "Authorization: token ${TOKEN}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d "{\"tag_name\":\"${TAG}\",\"name\":\"${TAG}\",\"body\":\"See [CHANGELOG.md](CHANGELOG.md) for details.\",\"draft\":false,\"prerelease\":false}" \
|
||||
| python3 -c "import sys,json; print(json.load(sys.stdin)['id'])")
|
||||
|
||||
# Upload archives
|
||||
for file in dist/claude-statusline-${VERSION}.tar.gz dist/claude-statusline-${VERSION}.zip; do
|
||||
FILENAME=$(basename "$file")
|
||||
curl -s -X POST "${API}/releases/${RELEASE_ID}/assets?name=${FILENAME}" \
|
||||
-H "Authorization: token ${TOKEN}" \
|
||||
-H "Content-Type: application/octet-stream" \
|
||||
--data-binary "@${file}"
|
||||
done
|
||||
Reference in New Issue
Block a user