name: Publish Manus bundle on: workflow_dispatch: push: branches: - main paths: - "*/SKILL.md" - "*/scripts/**" - "*/references/**" - "*/templates/**" - "scripts/build-manus-bundle.js" - "scripts/validate-skills.sh" - ".github/workflows/manus-bundle.yml" permissions: contents: write concurrency: group: manus-bundle-latest cancel-in-progress: true jobs: publish: runs-on: ubuntu-latest env: RELEASE_TAG: manus-bundle-latest RELEASE_TITLE: "Manus bundle (rolling)" steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: 20 cache: npm - run: npm ci - name: Build .skill bundle run: npm run build:manus-bundle - name: Verify build output run: | set -euo pipefail test -f dist/manus/k-skill-manus-all.zip test -f dist/manus/INDEX.md count=$(ls dist/manus/*.skill | wc -l) if [ "$count" -lt 1 ]; then echo "no .skill files produced" >&2 exit 1 fi echo "built $count .skill files" - name: Publish rolling release env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | set -euo pipefail notes=$(cat </dev/null 2>&1; then gh release edit "$RELEASE_TAG" \ --repo "$GITHUB_REPOSITORY" \ --title "$RELEASE_TITLE" \ --notes "$notes" \ --prerelease else gh release create "$RELEASE_TAG" \ --repo "$GITHUB_REPOSITORY" \ --title "$RELEASE_TITLE" \ --notes "$notes" \ --prerelease \ --target "$GITHUB_SHA" fi gh release upload "$RELEASE_TAG" \ --repo "$GITHUB_REPOSITORY" \ --clobber \ dist/manus/k-skill-manus-all.zip \ dist/manus/INDEX.md