| name | release-data |
| description | Zip the data/ directory and upload it as a GitHub Release asset. Use this skill when the user asks to "release the data", "publish data", "upload data", "push data to release", "update the release", or any variation of shipping the current data/ contents to GitHub Releases. |
Release Data
Packages the current data/ directory into data.zip and uploads it to a GitHub Release so users can download it via setup.sh.
Steps
-
Verify data exists
ls data/ | head -5
If data/ is empty or missing, stop and tell the user.
-
Zip the data directory
cd /Users/mincloud/workspaces/paper-explorer && zip -r data.zip data/
Report the resulting zip size.
-
Delete old data releases
List and delete all previous data-* releases so only the latest snapshot exists:
gh release list --repo brightjade/paper-explorer --limit 100 \
| awk -F'\t' '$3 ~ /^data-/ { print $3 }' \
| while read tag; do
echo "Deleting old release: $tag"
gh release delete "$tag" --repo brightjade/paper-explorer --yes --cleanup-tag
done
--cleanup-tag also deletes the associated git tag.
-
Create the new release
Use a date-based tag: data-YYYY-MM-DD (today's date).
gh release create "data-YYYY-MM-DD" data.zip \
--repo brightjade/paper-explorer \
--title "Data release YYYY-MM-DD" \
--notes "Paper data snapshot from YYYY-MM-DD. Download and extract with ./setup.sh" \
--latest
-
Clean up
rm data.zip
data.zip is in .gitignore so it should never be committed, but clean up anyway.
-
Confirm -- report the release URL to the user.
Important
- Never commit
data.zip to git. It is in .gitignore.
- Always use
--latest when creating a release so setup.sh (which defaults to latest) picks it up.
- If the user specifies a custom tag, use that instead of the date-based default.