Skip to content

Commit 6a4dbfd

Browse files
committed
Generate plugin repo YAML in CI
1 parent db3b08d commit 6a4dbfd

File tree

1 file changed

+58
-1
lines changed

1 file changed

+58
-1
lines changed

.github/workflows/release.yml

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ name: Manual Release
22

33
on:
44
workflow_dispatch: # Allows manual triggering
5+
inputs:
6+
version:
7+
description: 'Release version (e.g., 3.0.4)'
8+
required: true
9+
type: string
510

611
jobs:
712
release:
@@ -26,6 +31,11 @@ jobs:
2631
with:
2732
python-version: "3.x"
2833

34+
- name: Install Python dependencies
35+
run: |
36+
python -m pip install --upgrade pip
37+
pip install PyYAML requests
38+
2939
- name: Install dependencies
3040
run: go mod tidy -e || true
3141

@@ -38,9 +48,56 @@ jobs:
3848
- name: Build binary
3949
run: python3 .github/workflows/build.py
4050

51+
- name: Generate plugin repository YAML
52+
if: matrix.os == 'ubuntu-latest' # Only run on one platform
53+
env:
54+
GITHUB_REF_NAME: v${{ github.event.inputs.version }}
55+
run: python3 .github/workflows/generate_plugin_repo.py
56+
4157
- name: Create GitHub Release
58+
if: matrix.os == 'ubuntu-latest' # Only create release once
4259
uses: softprops/action-gh-release@v1
4360
with:
44-
files: dist/*
61+
tag_name: v${{ github.event.inputs.version }}
62+
name: Release v${{ github.event.inputs.version }}
63+
files: |
64+
dist/*
65+
plugin-repo-entry.yml
66+
plugin-repo-summary.txt
67+
body: |
68+
## CF CLI Java Plugin v${{ github.event.inputs.version }}
69+
70+
Plugin for profiling Java applications and getting heap and thread-dumps.
71+
72+
### Installation
73+
74+
```bash
75+
cf install-plugin -r CF-Community java
76+
```
77+
78+
Or download the appropriate binary for your platform and install manually:
79+
80+
```bash
81+
cf install-plugin <path-to-binary>
82+
```
83+
84+
### Plugin Repository Entry
85+
86+
The `plugin-repo-entry.yml` file contains the entry that should be added to the CF CLI plugin repository.
87+
88+
### Supported Platforms
89+
90+
- Linux (32-bit and 64-bit)
91+
- macOS (64-bit)
92+
- Windows (32-bit and 64-bit)
4593
env:
4694
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
95+
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

0 commit comments

Comments
 (0)