Merge pull request #37 from dadwadw233/add-claude-code-harness #31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release Notes | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'README.md' | |
| permissions: | |
| contents: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Generate release notes | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| # Get previous README.md content and compare | |
| PREV=$(git show HEAD~1:README.md 2>/dev/null || echo "") | |
| CURR=$(cat README.md) | |
| if [ -z "$PREV" ]; then | |
| echo "No previous README, skipping release notes" | |
| exit 0 | |
| fi | |
| # Extract new plugin lines (lines that exist in current but not previous) | |
| NEW_PLUGINS=$(diff <(echo "$PREV") <(echo "$CURR") | grep "^>" | grep "^>- \[" | sed 's/^> //' || true) | |
| if [ -z "$NEW_PLUGINS" ]; then | |
| echo "No new plugins detected" | |
| exit 0 | |
| fi | |
| echo "New plugins found:" | |
| echo "$NEW_PLUGINS" | |
| # Extract plugin names for tag | |
| TAG_DATE=$(date +%Y.%m.%d) | |
| TAG="plugins-${TAG_DATE}" | |
| # Check if tag exists | |
| if git rev-parse "$TAG" >/dev/null 2>&1; then | |
| TAG="plugins-${TAG_DATE}.$(date +%H%M%S)" | |
| fi | |
| # Build release body | |
| BODY=$(cat <<EOF | |
| ## New Plugins | |
| $NEW_PLUGINS | |
| --- | |
| Auto-generated from README.md changes on $(date -u +%Y-%m-%d) | |
| EOF | |
| ) | |
| # Create GitHub release | |
| gh release create "$TAG" \ | |
| --title "Plugin Update - $(date -u +%Y-%m-%d)" \ | |
| --notes "$BODY" \ | |
| --target main |