Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/workflows/publish-skills.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Publish Skills

on:
push:
branches: [main]
workflow_dispatch:

env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"

concurrency:
group: publish-skills
cancel-in-progress: true

permissions:
contents: write

jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"

- name: Validate skills
run: python scripts/validate_skills.py skills

- name: Package skills
run: python scripts/build_skills_dist.py

- name: Publish rolling skill archive
env:
GH_TOKEN: ${{ github.token }}
RELEASE_TAG: skills-latest
run: |
set -euo pipefail

asset="dist/skills/memory-onboarding.zip"
test -f "$asset"

if gh release view "$RELEASE_TAG" >/dev/null 2>&1; then
gh release upload "$RELEASE_TAG" "$asset" --clobber

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid clobbering the only release asset before upload

When an existing skills-latest release is updated, this uses gh release upload --clobber; the GitHub CLI docs for gh release upload state that --clobber deletes the existing asset before uploading the replacement, so if the runner is cancelled or the upload fails after deletion, the stable releases/download/skills-latest/memory-onboarding.zip URL will be left without an asset until a later successful rerun. This is especially relevant here because the workflow also uses cancel-in-progress: true, so overlapping main pushes can interrupt a publish while it is replacing the only downloadable archive.

Useful? React with 👍 / 👎.

gh release edit "$RELEASE_TAG" \
--notes "Rolling skill archives built from ${GITHUB_SHA}." \
--latest=false
else
gh release create "$RELEASE_TAG" "$asset" \
--target "$GITHUB_SHA" \
--title "Latest Basic Memory skills" \
--notes "Rolling skill archives built from ${GITHUB_SHA}." \
--latest=false
fi
Loading