Skip to content

Commit b25bda9

Browse files
committed
Improve release action
1 parent 2925b9a commit b25bda9

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.github/workflows/generate_plugin_repo.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,8 @@ def get_version_from_tag():
2727
version = version[1:] # Remove 'v' prefix
2828
return version or "dev"
2929

30-
def generate_plugin_repo_yaml():
30+
def generate_plugin_repo_yaml(version: str):
3131
"""Generate the plugin repository YAML file."""
32-
version = get_version_from_tag()
3332
repo_url = "https://github.com/SAP/cf-cli-java-plugin"
3433

3534
# Define the binary platforms and their corresponding file extensions
@@ -103,4 +102,8 @@ def generate_plugin_repo_yaml():
103102
print(f"Generated summary file: {summary_file}")
104103

105104
if __name__ == "__main__":
106-
generate_plugin_repo_yaml()
105+
if len(sys.argv) != 2:
106+
print("Usage: generate_plugin_repo.py <version>")
107+
print("Example: generate_plugin_repo.py 4.1.0")
108+
sys.exit(1)
109+
generate_plugin_repo_yaml(sys.argv[1])

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ jobs:
134134
run: |
135135
source venv/bin/activate
136136
echo "📝 Generating plugin repository YAML file for version ${{ github.event.inputs.version }}..."
137-
python3 .github/workflows/generate_plugin_repo.py
137+
python3 .github/workflows/generate_plugin_repo.py "${{ github.event.inputs.version }}"
138138
echo "✅ Plugin repository YAML generated"
139139
echo ""
140140
echo "Generated files:"

0 commit comments

Comments
 (0)