3434 - name : Install Python dependencies
3535 run : |
3636 python -m pip install --upgrade pip
37- pip install PyYAML requests
37+ pip install PyYAML
3838
3939 - name : Install dependencies
4040 run : go mod tidy -e || true
@@ -48,14 +48,57 @@ jobs:
4848 - name : Build binary
4949 run : python3 .github/workflows/build.py
5050
51+ - name : Upload build artifacts
52+ uses : actions/upload-artifact@v3
53+ with :
54+ name : binaries-${{ matrix.os }}
55+ path : dist/
56+
57+ create-release :
58+ name : Create GitHub Release with Plugin Repository Entry
59+ needs : release
60+ runs-on : ubuntu-latest
61+
62+ steps :
63+ - name : Checkout code
64+ uses : actions/checkout@v3
65+
66+ - name : Set up Python
67+ uses : actions/setup-python@v4
68+ with :
69+ python-version : " 3.x"
70+
71+ - name : Install Python dependencies
72+ run : |
73+ python -m pip install --upgrade pip
74+ pip install PyYAML
75+
76+ - name : Download all build artifacts
77+ uses : actions/download-artifact@v3
78+ with :
79+ path : artifacts/
80+
81+ - name : Combine all artifacts
82+ run : |
83+ mkdir -p dist
84+ find artifacts/ -type f -exec cp {} dist/ \;
85+ ls -la dist/
86+
5187 - name : Generate plugin repository YAML
52- if : matrix.os == 'ubuntu-latest' # Only run on one platform
5388 env :
5489 GITHUB_REF_NAME : v${{ github.event.inputs.version }}
55- run : python3 .github/workflows/generate_plugin_repo.py
90+ run : |
91+ echo "📝 Generating plugin repository YAML file for version ${{ github.event.inputs.version }}..."
92+ python3 .github/workflows/generate_plugin_repo.py
93+ echo "✅ Plugin repository YAML generated"
94+ echo ""
95+ echo "Generated files:"
96+ ls -la plugin-repo-*
97+ echo ""
98+ echo "Plugin repository entry preview:"
99+ head -20 plugin-repo-entry.yml
56100
57101 - name : Create GitHub Release
58- if : matrix.os == 'ubuntu-latest' # Only create release once
59102 uses : softprops/action-gh-release@v1
60103 with :
61104 tag_name : v${{ github.event.inputs.version }}
@@ -85,19 +128,33 @@ jobs:
85128
86129 The `plugin-repo-entry.yml` file contains the entry that should be added to the CF CLI plugin repository.
87130
131+ **To submit to CF CLI plugin repository:**
132+ 1. Fork [cli-plugin-repo](https://github.com/cloudfoundry-incubator/cli-plugin-repo)
133+ 2. Add the contents of `plugin-repo-entry.yml` to `repo-index.yml`
134+ 3. Create a pull request
135+
88136 ### Supported Platforms
89137
90138 - Linux (32-bit and 64-bit)
91139 - macOS (64-bit)
92140 - Windows (32-bit and 64-bit)
141+
142+ ### Checksums
143+
144+ All binaries include SHA1 checksums for verification. See `plugin-repo-summary.txt` for details.
93145 env :
94146 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
95147
96- - name : Upload plugin repository artifacts
97- if : matrix.os == 'ubuntu-latest'
98- uses : actions/upload-artifact@v3
99- with :
100- name : plugin-repository-files
101- path : |
102- plugin-repo-entry.yml
103- plugin-repo-summary.txt
148+ - name : Create Summary Comment
149+ run : |
150+ echo "## 🚀 Release v${{ github.event.inputs.version }} Created Successfully!" >> $GITHUB_STEP_SUMMARY
151+ echo "" >> $GITHUB_STEP_SUMMARY
152+ echo "### Files Generated:" >> $GITHUB_STEP_SUMMARY
153+ echo "- Release binaries for all platforms" >> $GITHUB_STEP_SUMMARY
154+ echo "- \`plugin-repo-entry.yml\` - CF CLI plugin repository entry" >> $GITHUB_STEP_SUMMARY
155+ echo "- \`plugin-repo-summary.txt\` - Human-readable summary" >> $GITHUB_STEP_SUMMARY
156+ echo "" >> $GITHUB_STEP_SUMMARY
157+ echo "### Next Steps:" >> $GITHUB_STEP_SUMMARY
158+ echo "1. Download \`plugin-repo-entry.yml\` from the release" >> $GITHUB_STEP_SUMMARY
159+ echo "2. Submit to CF CLI plugin repository" >> $GITHUB_STEP_SUMMARY
160+ echo "3. Update documentation if needed" >> $GITHUB_STEP_SUMMARY
0 commit comments