From 6a4dbfdabe668fd46e6fbf850d3988fb0e5bb9df Mon Sep 17 00:00:00 2001 From: Johannes Bechberger Date: Fri, 11 Jul 2025 11:42:10 +0200 Subject: [PATCH 01/21] Generate plugin repo YAML in CI --- .github/workflows/release.yml | 59 ++++++++++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e31b9b4..76f13c8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,6 +2,11 @@ name: Manual Release on: workflow_dispatch: # Allows manual triggering + inputs: + version: + description: 'Release version (e.g., 3.0.4)' + required: true + type: string jobs: release: @@ -26,6 +31,11 @@ jobs: with: python-version: "3.x" + - name: Install Python dependencies + run: | + python -m pip install --upgrade pip + pip install PyYAML requests + - name: Install dependencies run: go mod tidy -e || true @@ -38,9 +48,56 @@ jobs: - name: Build binary run: python3 .github/workflows/build.py + - name: Generate plugin repository YAML + if: matrix.os == 'ubuntu-latest' # Only run on one platform + env: + GITHUB_REF_NAME: v${{ github.event.inputs.version }} + run: python3 .github/workflows/generate_plugin_repo.py + - name: Create GitHub Release + if: matrix.os == 'ubuntu-latest' # Only create release once uses: softprops/action-gh-release@v1 with: - files: dist/* + tag_name: v${{ github.event.inputs.version }} + name: Release v${{ github.event.inputs.version }} + files: | + dist/* + plugin-repo-entry.yml + plugin-repo-summary.txt + body: | + ## CF CLI Java Plugin v${{ github.event.inputs.version }} + + Plugin for profiling Java applications and getting heap and thread-dumps. + + ### Installation + + ```bash + cf install-plugin -r CF-Community java + ``` + + Or download the appropriate binary for your platform and install manually: + + ```bash + cf install-plugin + ``` + + ### Plugin Repository Entry + + The `plugin-repo-entry.yml` file contains the entry that should be added to the CF CLI plugin repository. + + ### Supported Platforms + + - Linux (32-bit and 64-bit) + - macOS (64-bit) + - Windows (32-bit and 64-bit) env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Upload plugin repository artifacts + if: matrix.os == 'ubuntu-latest' + uses: actions/upload-artifact@v3 + with: + name: plugin-repository-files + path: | + plugin-repo-entry.yml + plugin-repo-summary.txt From fc8843e1b9109a70e6965b4dc0f6bf24c5466ef3 Mon Sep 17 00:00:00 2001 From: Johannes Bechberger Date: Fri, 11 Jul 2025 11:54:43 +0200 Subject: [PATCH 02/21] Generate plugin repo YAML in CI --- .github/workflows/build-and-snapshot.yml | 51 +++++++++------ .github/workflows/release.yml | 81 ++++++++++++++++++++---- 2 files changed, 99 insertions(+), 33 deletions(-) diff --git a/.github/workflows/build-and-snapshot.yml b/.github/workflows/build-and-snapshot.yml index d029662..fb8f24d 100644 --- a/.github/workflows/build-and-snapshot.yml +++ b/.github/workflows/build-and-snapshot.yml @@ -25,16 +25,6 @@ jobs: with: python-version: "3.11" - - name: Check if Python tests exist - id: check-tests - run: | - if [ -f "test/requirements.txt" ] && [ -f "test/test.sh" ]; then - echo "tests_exist=true" >> $GITHUB_OUTPUT - echo "โœ… Python test suite found" - else - echo "tests_exist=false" >> $GITHUB_OUTPUT - echo "โš ๏ธ Python test suite not found - skipping tests" - fi - name: Setup Python test environment if: steps.check-tests.outputs.tests_exist == 'true' @@ -46,21 +36,11 @@ jobs: python -m pip install -r requirements.txt - name: Run Python linting - if: steps.check-tests.outputs.tests_exist == 'true' run: | cd test source venv/bin/activate ../scripts/lint-python.sh ci -# - name: Run Python tests -# if: steps.check-tests.outputs.tests_exist == 'true' -# run: | -# cd testing -# source venv/bin/activate -# echo "๐Ÿงช Running Python tests..." -# pytest -v --tb=short -# echo "โœ… Python tests completed!" - build: name: Build and Test Go Plugin runs-on: ${{ matrix.os }} @@ -106,6 +86,19 @@ jobs: if: (github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && (needs.lint-and-test-python.result == 'success' || needs.lint-and-test-python.result == 'skipped') steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.11" + + - name: Install Python dependencies for plugin repo generation + run: | + python -m pip install --upgrade pip + pip install PyYAML + - name: Download all artifacts uses: actions/download-artifact@v4 with: @@ -116,6 +109,14 @@ jobs: mkdir -p dist mv dist/*/* dist/ || true + - name: Generate plugin repository YAML for snapshot + env: + GITHUB_REF_NAME: snapshot + run: | + echo "๐Ÿ“ Generating plugin repository YAML file..." + python3 .github/workflows/generate_plugin_repo.py + echo "โœ… Plugin repository YAML generated" + - uses: thomashampson/delete-older-releases@main with: keep_latest: 0 @@ -128,7 +129,10 @@ jobs: - name: Create GitHub Release uses: softprops/action-gh-release@v1 with: - files: dist/* + files: | + dist/* + plugin-repo-entry.yml + plugin-repo-summary.txt prerelease: false release: false tag_name: snapshot @@ -140,6 +144,11 @@ jobs: ## Build Status - โœ… Go Plugin: Built and tested on Linux, macOS, and Windows - โœ… Python Tests: Linting and test suite validation completed + - โœ… Plugin Repository: YAML entry generated automatically + + ## Plugin Repository Entry + The `plugin-repo-entry.yml` file contains the snapshot entry for the CF CLI plugin repository. + **Note:** This is a snapshot release - use the latest stable release for production. ## Changes This snapshot includes the latest commits from the repository. diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 76f13c8..8b2d598 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,7 +34,7 @@ jobs: - name: Install Python dependencies run: | python -m pip install --upgrade pip - pip install PyYAML requests + pip install PyYAML - name: Install dependencies run: go mod tidy -e || true @@ -48,14 +48,57 @@ jobs: - name: Build binary run: python3 .github/workflows/build.py + - name: Upload build artifacts + uses: actions/upload-artifact@v3 + with: + name: binaries-${{ matrix.os }} + path: dist/ + + create-release: + name: Create GitHub Release with Plugin Repository Entry + needs: release + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.x" + + - name: Install Python dependencies + run: | + python -m pip install --upgrade pip + pip install PyYAML + + - name: Download all build artifacts + uses: actions/download-artifact@v3 + with: + path: artifacts/ + + - name: Combine all artifacts + run: | + mkdir -p dist + find artifacts/ -type f -exec cp {} dist/ \; + ls -la dist/ + - name: Generate plugin repository YAML - if: matrix.os == 'ubuntu-latest' # Only run on one platform env: GITHUB_REF_NAME: v${{ github.event.inputs.version }} - run: python3 .github/workflows/generate_plugin_repo.py + run: | + echo "๐Ÿ“ Generating plugin repository YAML file for version ${{ github.event.inputs.version }}..." + python3 .github/workflows/generate_plugin_repo.py + echo "โœ… Plugin repository YAML generated" + echo "" + echo "Generated files:" + ls -la plugin-repo-* + echo "" + echo "Plugin repository entry preview:" + head -20 plugin-repo-entry.yml - name: Create GitHub Release - if: matrix.os == 'ubuntu-latest' # Only create release once uses: softprops/action-gh-release@v1 with: tag_name: v${{ github.event.inputs.version }} @@ -85,19 +128,33 @@ jobs: The `plugin-repo-entry.yml` file contains the entry that should be added to the CF CLI plugin repository. + **To submit to CF CLI plugin repository:** + 1. Fork [cli-plugin-repo](https://github.com/cloudfoundry-incubator/cli-plugin-repo) + 2. Add the contents of `plugin-repo-entry.yml` to `repo-index.yml` + 3. Create a pull request + ### Supported Platforms - Linux (32-bit and 64-bit) - macOS (64-bit) - Windows (32-bit and 64-bit) + + ### Checksums + + All binaries include SHA1 checksums for verification. See `plugin-repo-summary.txt` for details. env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Upload plugin repository artifacts - if: matrix.os == 'ubuntu-latest' - uses: actions/upload-artifact@v3 - with: - name: plugin-repository-files - path: | - plugin-repo-entry.yml - plugin-repo-summary.txt + - name: Create Summary Comment + run: | + echo "## ๐Ÿš€ Release v${{ github.event.inputs.version }} Created Successfully!" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "### Files Generated:" >> $GITHUB_STEP_SUMMARY + echo "- Release binaries for all platforms" >> $GITHUB_STEP_SUMMARY + echo "- \`plugin-repo-entry.yml\` - CF CLI plugin repository entry" >> $GITHUB_STEP_SUMMARY + echo "- \`plugin-repo-summary.txt\` - Human-readable summary" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "### Next Steps:" >> $GITHUB_STEP_SUMMARY + echo "1. Download \`plugin-repo-entry.yml\` from the release" >> $GITHUB_STEP_SUMMARY + echo "2. Submit to CF CLI plugin repository" >> $GITHUB_STEP_SUMMARY + echo "3. Update documentation if needed" >> $GITHUB_STEP_SUMMARY From 2984df427dba816c6d6ffd9c87acbd851c3d1394 Mon Sep 17 00:00:00 2001 From: Johannes Bechberger Date: Fri, 11 Jul 2025 11:59:15 +0200 Subject: [PATCH 03/21] Generate plugin repo YAML in CI --- .github/workflows/build-and-snapshot.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-snapshot.yml b/.github/workflows/build-and-snapshot.yml index fb8f24d..88b2018 100644 --- a/.github/workflows/build-and-snapshot.yml +++ b/.github/workflows/build-and-snapshot.yml @@ -25,6 +25,16 @@ jobs: with: python-version: "3.11" + - name: Check if Python tests exist + id: check-tests + run: | + if [ -f "test/requirements.txt" ] && [ -f "test/test.sh" ]; then + echo "tests_exist=true" >> $GITHUB_OUTPUT + echo "โœ… Python test suite found" + else + echo "tests_exist=false" >> $GITHUB_OUTPUT + echo "โš ๏ธ Python test suite not found - skipping tests" + fi - name: Setup Python test environment if: steps.check-tests.outputs.tests_exist == 'true' @@ -36,6 +46,7 @@ jobs: python -m pip install -r requirements.txt - name: Run Python linting + if: steps.check-tests.outputs.tests_exist == 'true' run: | cd test source venv/bin/activate @@ -142,7 +153,7 @@ jobs: Please test it and provide feedback. ## Build Status - - โœ… Go Plugin: Built and tested on Linux, macOS, and Windows + - โœ… Go Plugin: Built on Linux, macOS, and Windows - โœ… Python Tests: Linting and test suite validation completed - โœ… Plugin Repository: YAML entry generated automatically From c81caecf69fa38001014d4fd7127583809ce8011 Mon Sep 17 00:00:00 2001 From: Johannes Bechberger Date: Fri, 11 Jul 2025 12:04:54 +0200 Subject: [PATCH 04/21] Generate plugin repo YAML in CI --- .github/workflows/build-and-snapshot.yml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/.github/workflows/build-and-snapshot.yml b/.github/workflows/build-and-snapshot.yml index 88b2018..93f8b14 100644 --- a/.github/workflows/build-and-snapshot.yml +++ b/.github/workflows/build-and-snapshot.yml @@ -25,19 +25,7 @@ jobs: with: python-version: "3.11" - - name: Check if Python tests exist - id: check-tests - run: | - if [ -f "test/requirements.txt" ] && [ -f "test/test.sh" ]; then - echo "tests_exist=true" >> $GITHUB_OUTPUT - echo "โœ… Python test suite found" - else - echo "tests_exist=false" >> $GITHUB_OUTPUT - echo "โš ๏ธ Python test suite not found - skipping tests" - fi - - name: Setup Python test environment - if: steps.check-tests.outputs.tests_exist == 'true' run: | cd test python -m venv venv @@ -46,7 +34,6 @@ jobs: python -m pip install -r requirements.txt - name: Run Python linting - if: steps.check-tests.outputs.tests_exist == 'true' run: | cd test source venv/bin/activate From 8eea8b4ad7c9af37e539a41e86d56f40cab7fa6d Mon Sep 17 00:00:00 2001 From: Johannes Bechberger Date: Fri, 11 Jul 2025 12:08:11 +0200 Subject: [PATCH 05/21] Generate plugin repo YAML in CI --- .github/workflows/generate_plugin_repo.py | 108 ++++++++++++++++++++++ .github/workflows/plugin-repo.yml | 56 +++++++++++ 2 files changed, 164 insertions(+) create mode 100644 .github/workflows/generate_plugin_repo.py create mode 100644 .github/workflows/plugin-repo.yml diff --git a/.github/workflows/generate_plugin_repo.py b/.github/workflows/generate_plugin_repo.py new file mode 100644 index 0000000..ada424e --- /dev/null +++ b/.github/workflows/generate_plugin_repo.py @@ -0,0 +1,108 @@ +#!/usr/bin/env python3 +""" +Generate plugin repository YAML file for CF CLI plugin repository. +This script creates the YAML file in the required format for the CF CLI plugin repository. +""" + +import os +import sys +import yaml +import hashlib +import requests +from datetime import datetime +from pathlib import Path + +def calculate_sha1(file_path): + """Calculate SHA1 checksum of a file.""" + sha1_hash = hashlib.sha1() + with open(file_path, "rb") as f: + for chunk in iter(lambda: f.read(4096), b""): + sha1_hash.update(chunk) + return sha1_hash.hexdigest() + +def get_version_from_tag(): + """Get version from git tag or environment variable.""" + version = os.environ.get('GITHUB_REF_NAME', '') + if version.startswith('v'): + version = version[1:] # Remove 'v' prefix + return version or "dev" + +def generate_plugin_repo_yaml(): + """Generate the plugin repository YAML file.""" + version = get_version_from_tag() + repo_url = "https://github.com/SAP/cf-cli-java-plugin" + + # Define the binary platforms and their corresponding file extensions + platforms = { + "osx": "cf-cli-java-plugin-osx", + "win64": "cf-cli-java-plugin-win64.exe", + "win32": "cf-cli-java-plugin-win32.exe", + "linux32": "cf-cli-java-plugin-linux32", + "linux64": "cf-cli-java-plugin-linux64" + } + + binaries = [] + dist_dir = Path("dist") + + for platform, filename in platforms.items(): + file_path = dist_dir / filename + if file_path.exists(): + checksum = calculate_sha1(file_path) + binary_info = { + "checksum": checksum, + "platform": platform, + "url": f"{repo_url}/releases/download/v{version}/{filename}" + } + binaries.append(binary_info) + print(f"Added {platform}: {filename} (checksum: {checksum})") + else: + print(f"Warning: Binary not found for {platform}: {filename}") + + if not binaries: + print("Error: No binaries found in dist/ directory") + sys.exit(1) + + # Create the plugin repository entry + plugin_entry = { + "authors": [{ + "contact": "johannes.bechberger@sap.com", + "homepage": "https://github.com/SAP", + "name": "Johannes Bechberger" + }], + "binaries": binaries, + "company": "SAP", + "created": "2024-01-01T00:00:00Z", # Initial creation date + "description": "Plugin for profiling Java applications and getting heap and thread-dumps", + "homepage": repo_url, + "name": "java", + "updated": datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%SZ"), + "version": version + } + + # Write the YAML file + output_file = Path("plugin-repo-entry.yml") + with open(output_file, 'w') as f: + yaml.dump(plugin_entry, f, default_flow_style=False, sort_keys=False) + + print(f"Generated plugin repository YAML file: {output_file}") + print(f"Version: {version}") + print(f"Binaries: {len(binaries)} platforms") + + # Also create a human-readable summary + summary_file = Path("plugin-repo-summary.txt") + with open(summary_file, 'w') as f: + f.write(f"CF CLI Java Plugin Repository Entry\n") + f.write(f"====================================\n\n") + f.write(f"Version: {version}\n") + f.write(f"Updated: {plugin_entry['updated']}\n") + f.write(f"Binaries: {len(binaries)} platforms\n\n") + f.write("Platform checksums:\n") + for binary in binaries: + f.write(f" {binary['platform']}: {binary['checksum']}\n") + f.write(f"\nRepository URL: {repo_url}\n") + f.write(f"Release URL: {repo_url}/releases/tag/v{version}\n") + + print(f"Generated summary file: {summary_file}") + +if __name__ == "__main__": + generate_plugin_repo_yaml() \ No newline at end of file diff --git a/.github/workflows/plugin-repo.yml b/.github/workflows/plugin-repo.yml new file mode 100644 index 0000000..fb87aef --- /dev/null +++ b/.github/workflows/plugin-repo.yml @@ -0,0 +1,56 @@ +name: Generate Plugin Repository Entry + +on: + release: + types: [published] + +jobs: + generate-plugin-repo: + name: Generate Plugin Repository YAML + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.x" + + - name: Install Python dependencies + run: | + python -m pip install --upgrade pip + pip install PyYAML requests + + - name: Download release assets + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + mkdir -p dist + # Download all release assets + gh release download ${{ github.event.release.tag_name }} -D dist/ + + - name: Generate plugin repository YAML + env: + GITHUB_REF_NAME: ${{ github.event.release.tag_name }} + run: python3 .github/workflows/generate_plugin_repo.py + + - name: Upload plugin repository files to release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh release upload ${{ github.event.release.tag_name }} plugin-repo-entry.yml plugin-repo-summary.txt + + - name: Create PR to plugin repository (optional) + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + echo "Plugin repository entry generated!" + echo "To submit to CF CLI plugin repository:" + echo "1. Fork https://github.com/cloudfoundry-incubator/cli-plugin-repo" + echo "2. Add the contents of plugin-repo-entry.yml to repo-index.yml" + echo "3. Create a pull request" + echo "" + echo "Entry content:" + cat plugin-repo-entry.yml \ No newline at end of file From 260d735c1dd19c9b71d5eedfd77f521331dfb5a1 Mon Sep 17 00:00:00 2001 From: Johannes Bechberger Date: Fri, 11 Jul 2025 12:14:20 +0200 Subject: [PATCH 06/21] Generate plugin repo YAML in CI --- .github/workflows/build-and-snapshot.yml | 4 ++++ .github/workflows/release.yml | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-snapshot.yml b/.github/workflows/build-and-snapshot.yml index 93f8b14..d38b772 100644 --- a/.github/workflows/build-and-snapshot.yml +++ b/.github/workflows/build-and-snapshot.yml @@ -112,6 +112,10 @@ jobs: GITHUB_REF_NAME: snapshot run: | echo "๐Ÿ“ Generating plugin repository YAML file..." + python3 -m venv venv + source venv/bin/activate + python3 -m pip install --upgrade pip + pip install PyYAML requests python3 .github/workflows/generate_plugin_repo.py echo "โœ… Plugin repository YAML generated" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8b2d598..9f7bdce 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -70,8 +70,10 @@ jobs: - name: Install Python dependencies run: | - python -m pip install --upgrade pip - pip install PyYAML + python3 -m venv venv + source venv/bin/activate + python3 -m pip install --upgrade pip + pip install PyYAML requests - name: Download all build artifacts uses: actions/download-artifact@v3 From 3c66789f30ae9bbd21dc9051dc3528d9f4e77518 Mon Sep 17 00:00:00 2001 From: Johannes Bechberger Date: Fri, 11 Jul 2025 12:22:33 +0200 Subject: [PATCH 07/21] Generate plugin repo YAML in CI --- .github/workflows/generate_plugin_repo.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/generate_plugin_repo.py b/.github/workflows/generate_plugin_repo.py index ada424e..15ab352 100644 --- a/.github/workflows/generate_plugin_repo.py +++ b/.github/workflows/generate_plugin_repo.py @@ -34,11 +34,9 @@ def generate_plugin_repo_yaml(): # Define the binary platforms and their corresponding file extensions platforms = { - "osx": "cf-cli-java-plugin-osx", - "win64": "cf-cli-java-plugin-win64.exe", - "win32": "cf-cli-java-plugin-win32.exe", - "linux32": "cf-cli-java-plugin-linux32", - "linux64": "cf-cli-java-plugin-linux64" + "linux64": "cf-cli-java-plugin-linux-amd64", + "osx": "cf-cli-java-plugin-macos-arm64", + "win64": "cf-cli-java-plugin-windows-amd64.exe" } binaries = [] From d267ad86c8983e8cdb7ad8bab20051b83eb55110 Mon Sep 17 00:00:00 2001 From: Johannes Bechberger Date: Fri, 11 Jul 2025 12:29:37 +0200 Subject: [PATCH 08/21] Generate plugin repo YAML in CI --- .github/workflows/generate_plugin_repo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate_plugin_repo.py b/.github/workflows/generate_plugin_repo.py index 15ab352..055156d 100644 --- a/.github/workflows/generate_plugin_repo.py +++ b/.github/workflows/generate_plugin_repo.py @@ -36,7 +36,7 @@ def generate_plugin_repo_yaml(): platforms = { "linux64": "cf-cli-java-plugin-linux-amd64", "osx": "cf-cli-java-plugin-macos-arm64", - "win64": "cf-cli-java-plugin-windows-amd64.exe" + "win64": "cf-cli-java-plugin-windows-amd64" } binaries = [] From 663ed9f5a153ffbd96052e90ae456f9f78feff5e Mon Sep 17 00:00:00 2001 From: Johannes Bechberger Date: Fri, 11 Jul 2025 12:33:15 +0200 Subject: [PATCH 09/21] Generate plugin repo YAML in CI --- .github/workflows/build-and-snapshot.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-snapshot.yml b/.github/workflows/build-and-snapshot.yml index d38b772..d3253c6 100644 --- a/.github/workflows/build-and-snapshot.yml +++ b/.github/workflows/build-and-snapshot.yml @@ -136,7 +136,7 @@ jobs: plugin-repo-entry.yml plugin-repo-summary.txt prerelease: false - release: false + draft: true tag_name: snapshot body: | This is a snapshot release of the cf-cli-java-plugin. From f624b32b54635f339a2562d8755b1ac4586ef025 Mon Sep 17 00:00:00 2001 From: Johannes Bechberger Date: Fri, 11 Jul 2025 12:44:24 +0200 Subject: [PATCH 10/21] Generate plugin repo YAML in CI --- .github/workflows/build-and-snapshot.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/build-and-snapshot.yml b/.github/workflows/build-and-snapshot.yml index d3253c6..273870f 100644 --- a/.github/workflows/build-and-snapshot.yml +++ b/.github/workflows/build-and-snapshot.yml @@ -128,6 +128,15 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Delete and regenerate tag snapshot + run: | + echo "Deleting existing snapshot tag..." + git tag -d snapshot || true + git push origin :snapshot || true + echo "Regenerating snapshot tag..." + git tag snapshot + git push origin snapshot --force + - name: Create GitHub Release uses: softprops/action-gh-release@v1 with: From 16b1b14fc96311489c3a1008ce60008ab43c7057 Mon Sep 17 00:00:00 2001 From: Johannes Bechberger Date: Fri, 11 Jul 2025 12:50:21 +0200 Subject: [PATCH 11/21] Generate plugin repo YAML in CI --- .github/workflows/build-and-snapshot.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-snapshot.yml b/.github/workflows/build-and-snapshot.yml index 273870f..54b2d64 100644 --- a/.github/workflows/build-and-snapshot.yml +++ b/.github/workflows/build-and-snapshot.yml @@ -144,8 +144,8 @@ jobs: dist/* plugin-repo-entry.yml plugin-repo-summary.txt - prerelease: false - draft: true + prerelease: true + draft: false tag_name: snapshot body: | This is a snapshot release of the cf-cli-java-plugin. From 1c297dbb22832cd809b5a8ce8363caae2125dc22 Mon Sep 17 00:00:00 2001 From: Johannes Bechberger Date: Fri, 11 Jul 2025 13:41:14 +0200 Subject: [PATCH 12/21] Generate plugin repo YAML in CI --- .github/workflows/build-and-snapshot.yml | 23 +++++++- .github/workflows/release.yml | 67 +++++++++++++++--------- 2 files changed, 62 insertions(+), 28 deletions(-) diff --git a/.github/workflows/build-and-snapshot.yml b/.github/workflows/build-and-snapshot.yml index 54b2d64..1fe452c 100644 --- a/.github/workflows/build-and-snapshot.yml +++ b/.github/workflows/build-and-snapshot.yml @@ -144,7 +144,7 @@ jobs: dist/* plugin-repo-entry.yml plugin-repo-summary.txt - prerelease: true + prerelease: false draft: false tag_name: snapshot body: | @@ -152,9 +152,26 @@ jobs: It includes the latest changes and is not intended for production use. Please test it and provide feedback. + ## Installation + + Download the current snapshot release and install manually: + + ```sh + # on Mac arm64 + cf install-plugin https://github.com/SAP/cf-cli-java-plugin/releases/download/snapshot/cf-cli-java-plugin-macos-arm64 + # on Windows x86 + cf install-plugin https://github.com/SAP/cf-cli-java-plugin/releases/download/snapshot/cf-cli-java-plugin-windows-amd64 + # on Linux x86 + cf install-plugin https://github.com/SAP/cf-cli-java-plugin/releases/download/snapshot/cf-cli-java-plugin-linux-amd64 + ``` + + **Note:** On Linux and macOS, if you get a permission error, run `chmod +x [cf-cli-java-plugin]` on the plugin binary. + On Windows, the plugin will refuse to install unless the binary has the `.exe` file extension. + + You can verify that the plugin is successfully installed by looking for `java` in the output of `cf plugins`. + ## Build Status - โœ… Go Plugin: Built on Linux, macOS, and Windows - - โœ… Python Tests: Linting and test suite validation completed - โœ… Plugin Repository: YAML entry generated automatically ## Plugin Repository Entry @@ -163,6 +180,8 @@ jobs: ## Changes This snapshot includes the latest commits from the repository. + + **Build Timestamp**: $(date -u +"%Y-%m-%d %H:%M:%S UTC") name: Snapshot Release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9f7bdce..67bec25 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -90,6 +90,7 @@ jobs: env: GITHUB_REF_NAME: v${{ github.event.inputs.version }} run: | + source venv/bin/activate echo "๐Ÿ“ Generating plugin repository YAML file for version ${{ github.event.inputs.version }}..." python3 .github/workflows/generate_plugin_repo.py echo "โœ… Plugin repository YAML generated" @@ -114,36 +115,50 @@ jobs: Plugin for profiling Java applications and getting heap and thread-dumps. - ### Installation - + ## Installation + + ### Installation via CF Community Repository + + Make sure you have the CF Community plugin repository configured or add it via: ```bash - cf install-plugin -r CF-Community java + cf add-plugin-repo CF-Community http://plugins.cloudfoundry.org ``` - - Or download the appropriate binary for your platform and install manually: - + + Trigger installation of the plugin via: ```bash - cf install-plugin + cf install-plugin -r CF-Community "java" ``` - - ### Plugin Repository Entry - - The `plugin-repo-entry.yml` file contains the entry that should be added to the CF CLI plugin repository. - - **To submit to CF CLI plugin repository:** - 1. Fork [cli-plugin-repo](https://github.com/cloudfoundry-incubator/cli-plugin-repo) - 2. Add the contents of `plugin-repo-entry.yml` to `repo-index.yml` - 3. Create a pull request - - ### Supported Platforms - - - Linux (32-bit and 64-bit) - - macOS (64-bit) - - Windows (32-bit and 64-bit) - - ### Checksums - - All binaries include SHA1 checksums for verification. See `plugin-repo-summary.txt` for details. + + ### Manual Installation + + Download this specific release (v${{ github.event.inputs.version }}) and install manually: + + ```bash + # on Mac arm64 + cf install-plugin https://github.com/SAP/cf-cli-java-plugin/releases/download/v${{ github.event.inputs.version }}/cf-cli-java-plugin-macos-arm64 + # on Windows x86 + cf install-plugin https://github.com/SAP/cf-cli-java-plugin/releases/download/v${{ github.event.inputs.version }}/cf-cli-java-plugin-windows-amd64 + # on Linux x86 + cf install-plugin https://github.com/SAP/cf-cli-java-plugin/releases/download/v${{ github.event.inputs.version }}/cf-cli-java-plugin-linux-amd64 + ``` + + Or download the latest release: + + ```bash + # on Mac arm64 + cf install-plugin https://github.com/SAP/cf-cli-java-plugin/releases/latest/download/cf-cli-java-plugin-macos-arm64 + # on Windows x86 + cf install-plugin https://github.com/SAP/cf-cli-java-plugin/releases/latest/download/cf-cli-java-plugin-windows-amd64 + # on Linux x86 + cf install-plugin https://github.com/SAP/cf-cli-java-plugin/releases/latest/download/cf-cli-java-plugin-linux-amd64 + ``` + + **Note:** On Linux and macOS, if you get a permission error, run `chmod +x [cf-cli-java-plugin]` on the plugin binary. + On Windows, the plugin will refuse to install unless the binary has the `.exe` file extension. + + You can verify that the plugin is successfully installed by looking for `java` in the output of `cf plugins`. + + **Build Timestamp**: $(date -u +"%Y-%m-%d %H:%M:%S UTC") env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 77734683df7028c1f05876b690842fa23c34cc12 Mon Sep 17 00:00:00 2001 From: Johannes Bechberger Date: Fri, 11 Jul 2025 13:51:52 +0200 Subject: [PATCH 13/21] Generate plugin repo YAML in CI --- .github/workflows/build-and-snapshot.yml | 18 ++++++------------ .github/workflows/release.yml | 6 +++++- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-and-snapshot.yml b/.github/workflows/build-and-snapshot.yml index 1fe452c..e5e6e7b 100644 --- a/.github/workflows/build-and-snapshot.yml +++ b/.github/workflows/build-and-snapshot.yml @@ -119,6 +119,10 @@ jobs: python3 .github/workflows/generate_plugin_repo.py echo "โœ… Plugin repository YAML generated" + - name: Generate timestamp + id: timestamp + run: echo "timestamp=$(date -u +'%Y-%m-%d %H:%M:%S UTC')" >> $GITHUB_OUTPUT + - uses: thomashampson/delete-older-releases@main with: keep_latest: 0 @@ -152,6 +156,8 @@ jobs: It includes the latest changes and is not intended for production use. Please test it and provide feedback. + **Build Timestamp**: ${{ steps.timestamp.outputs.timestamp }} + ## Installation Download the current snapshot release and install manually: @@ -169,19 +175,7 @@ jobs: On Windows, the plugin will refuse to install unless the binary has the `.exe` file extension. You can verify that the plugin is successfully installed by looking for `java` in the output of `cf plugins`. - - ## Build Status - - โœ… Go Plugin: Built on Linux, macOS, and Windows - - โœ… Plugin Repository: YAML entry generated automatically - - ## Plugin Repository Entry - The `plugin-repo-entry.yml` file contains the snapshot entry for the CF CLI plugin repository. - **Note:** This is a snapshot release - use the latest stable release for production. - - ## Changes - This snapshot includes the latest commits from the repository. - **Build Timestamp**: $(date -u +"%Y-%m-%d %H:%M:%S UTC") name: Snapshot Release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 67bec25..9001e99 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -101,6 +101,10 @@ jobs: echo "Plugin repository entry preview:" head -20 plugin-repo-entry.yml + - name: Generate timestamp + id: timestamp + run: echo "timestamp=$(date -u +'%Y-%m-%d %H:%M:%S UTC')" >> $GITHUB_OUTPUT + - name: Create GitHub Release uses: softprops/action-gh-release@v1 with: @@ -158,7 +162,7 @@ jobs: You can verify that the plugin is successfully installed by looking for `java` in the output of `cf plugins`. - **Build Timestamp**: $(date -u +"%Y-%m-%d %H:%M:%S UTC") + **Build Timestamp**: ${{ steps.timestamp.outputs.timestamp }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 0f8da314247b2c9475890bbbc17e5c52d88c7c45 Mon Sep 17 00:00:00 2001 From: Johannes Bechberger Date: Fri, 11 Jul 2025 14:14:53 +0200 Subject: [PATCH 14/21] Update version script --- .github/workflows/release.yml | 41 +++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9001e99..e241b37 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,6 +8,10 @@ on: required: true type: string +permissions: + contents: write + actions: read + jobs: release: name: Create Proper Release on All Platforms @@ -62,6 +66,9 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v3 + with: + token: ${{ secrets.GITHUB_TOKEN }} + fetch-depth: 0 - name: Set up Python uses: actions/setup-python@v4 @@ -75,6 +82,36 @@ jobs: python3 -m pip install --upgrade pip pip install PyYAML requests + - name: Parse version and update Go source + run: | + # Parse version input (e.g., "4.1.0" -> major=4, minor=1, build=0) + VERSION="${{ github.event.inputs.version }}" + IFS='.' read -r MAJOR MINOR BUILD <<< "$VERSION" + + echo "Updating version to $MAJOR.$MINOR.$BUILD" + python3 .github/workflows/update_version.py "$MAJOR" "$MINOR" "$BUILD" + + # Configure git + git config --local user.email "action@github.com" + git config --local user.name "GitHub Action" + + # Check if there are changes + if git diff --quiet; then + echo "No version changes detected" + else + echo "Committing version update" + git add cf_cli_java_plugin.go README.md + git commit -m "Set version to v$VERSION" + git push + fi + + - name: Create and push tag + run: | + VERSION="${{ github.event.inputs.version }}" + echo "Creating tag v$VERSION" + git tag "v$VERSION" + git push origin "v$VERSION" + - name: Download all build artifacts uses: actions/download-artifact@v3 with: @@ -119,6 +156,10 @@ jobs: Plugin for profiling Java applications and getting heap and thread-dumps. + ## Changes + + $(cat release_changelog.txt || echo "No changelog available") + ## Installation ### Installation via CF Community Repository From 9f09c3d7e9bfb5a4db7f1f299733a583520798f1 Mon Sep 17 00:00:00 2001 From: Johannes Bechberger Date: Fri, 11 Jul 2025 14:17:10 +0200 Subject: [PATCH 15/21] Update version script --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e241b37..309f091 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -53,7 +53,7 @@ jobs: run: python3 .github/workflows/build.py - name: Upload build artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: binaries-${{ matrix.os }} path: dist/ From 1cb93e357a2b5f8f1d2d2970683d8832d1725190 Mon Sep 17 00:00:00 2001 From: Johannes Bechberger Date: Fri, 11 Jul 2025 14:18:22 +0200 Subject: [PATCH 16/21] Update version script --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 309f091..3711864 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,10 +44,10 @@ jobs: run: go mod tidy -e || true - name: Lint Go files - run: ./scripts/lint-go.sh check + run: ./scripts/lint-go.sh ci - name: Run tests - run: ./scripts/lint-go.sh test + run: ./scripts/lint-go.sh ci - name: Build binary run: python3 .github/workflows/build.py From b5fbe4b5d67e53178fb04f5d0f5258e8ec2bf483 Mon Sep 17 00:00:00 2001 From: Johannes Bechberger Date: Fri, 11 Jul 2025 14:23:42 +0200 Subject: [PATCH 17/21] Update version script --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3711864..8314107 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -113,7 +113,7 @@ jobs: git push origin "v$VERSION" - name: Download all build artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: path: artifacts/ From 6903ab36ec5e1b6e8ca73b4c77abeb1ee3cd2de1 Mon Sep 17 00:00:00 2001 From: Johannes Bechberger Date: Fri, 11 Jul 2025 14:31:48 +0200 Subject: [PATCH 18/21] Update version script --- .github/workflows/update_version.py | 145 ++++++++++++++++++++++++++++ 1 file changed, 145 insertions(+) create mode 100644 .github/workflows/update_version.py diff --git a/.github/workflows/update_version.py b/.github/workflows/update_version.py new file mode 100644 index 0000000..ced03c2 --- /dev/null +++ b/.github/workflows/update_version.py @@ -0,0 +1,145 @@ +#!/usr/bin/env python3 +""" +Update version in cf_cli_java_plugin.go for releases. +This script updates the PluginMetadata version in the Go source code and processes the changelog. +""" + +import sys +import re +from pathlib import Path + +def update_version_in_go_file(file_path, major, minor, build): + """Update the version in the Go plugin metadata.""" + with open(file_path, 'r') as f: + content = f.read() + + # Pattern to match the Version struct in PluginMetadata + pattern = r'(Version: plugin\.VersionType\s*{\s*Major:\s*)\d+(\s*,\s*Minor:\s*)\d+(\s*,\s*Build:\s*)\d+(\s*,\s*})' + + replacement = rf'\g<1>{major}\g<2>{minor}\g<3>{build}\g<4>' + + new_content = re.sub(pattern, replacement, content) + + if new_content == content: + print(f"Warning: Version pattern not found or not updated in {file_path}") + return False + + with open(file_path, 'w') as f: + f.write(new_content) + + print(f"โœ… Updated version to {major}.{minor}.{build} in {file_path}") + return True + +def process_readme_changelog(readme_path, version): + """Process the README changelog section for the release.""" + with open(readme_path, 'r') as f: + content = f.read() + + # Look for the snapshot section + snapshot_pattern = rf'## {re.escape(version)}-snapshot\s*\n' + match = re.search(snapshot_pattern, content) + + if not match: + print(f"Error: README.md does not contain a '## {version}-snapshot' section") + return False, None + + # Find the content of the snapshot section + start_pos = match.end() + + # Find the next ## section or end of file + next_section_pattern = r'\n## ' + next_match = re.search(next_section_pattern, content[start_pos:]) + + if next_match: + end_pos = start_pos + next_match.start() + section_content = content[start_pos:end_pos].strip() + else: + section_content = content[start_pos:].strip() + + # Remove the "-snapshot" from the header + new_header = f"## {version}" + updated_content = re.sub(snapshot_pattern, new_header + '\n\n', content) + + # Write the updated README + with open(readme_path, 'w') as f: + f.write(updated_content) + + print(f"โœ… Updated README.md: converted '## {version}-snapshot' to '## {version}'") + return True, section_content + +def get_base_version(version): + """Return the base version (e.g., 4.0.0 from 4.0.0-rc2)""" + return version.split('-')[0] + +def is_rc_version(version_str): + """Return True if the version string ends with -rc or -rcN.""" + return bool(re.match(r"^\d+\.\d+\.\d+-rc(\d+)?$", version_str)) + +def main(): + if len(sys.argv) != 4: + print("Usage: update_version.py ") + print("Example: update_version.py 4 1 0") + sys.exit(1) + + try: + major = int(sys.argv[1]) + minor = int(sys.argv[2]) + build = int(sys.argv[3]) + except ValueError: + print("Error: Version numbers must be integers") + sys.exit(1) + + version = f"{major}.{minor}.{build}" + version_arg = f"{major}.{minor}.{build}" if (major + minor + build) != 0 else sys.argv[1] + # Accept any -rc suffix, e.g. 4.0.0-rc, 4.0.0-rc1, 4.0.0-rc2 + if is_rc_version(sys.argv[1]): + base_version = get_base_version(sys.argv[1]) + go_file = Path("cf_cli_java_plugin.go") + readme_file = Path("README.md") + changelog_file = Path("release_changelog.txt") + if not readme_file.exists(): + print(f"Error: {readme_file} not found") + sys.exit(1) + with open(readme_file, 'r') as f: + content = f.read() + # Find the section for the base version + base_pattern = rf'## {re.escape(base_version)}\s*\n' + match = re.search(base_pattern, content) + if not match: + print(f"Error: README.md does not contain a '## {base_version}' section for RC release") + sys.exit(1) + start_pos = match.end() + next_match = re.search(r'\n## ', content[start_pos:]) + if next_match: + end_pos = start_pos + next_match.start() + section_content = content[start_pos:end_pos].strip() + else: + section_content = content[start_pos:].strip() + with open(changelog_file, 'w') as f: + f.write(section_content) + print(f"โœ… RC release: Changelog for {base_version} saved to {changelog_file}") + sys.exit(0) + + go_file = Path("cf_cli_java_plugin.go") + readme_file = Path("README.md") + changelog_file = Path("release_changelog.txt") + + # Update Go version + success = update_version_in_go_file(go_file, major, minor, build) + if not success: + sys.exit(1) + + # Process README changelog + success, changelog_content = process_readme_changelog(readme_file, version) + if not success: + sys.exit(1) + + # Write changelog content to a file for the workflow to use + with open(changelog_file, 'w') as f: + f.write(changelog_content) + + print(f"โœ… Version updated successfully to {version}") + print(f"โœ… Changelog content saved to {changelog_file}") + +if __name__ == "__main__": + main() From dc8776a347bc14af536ceeb1859e34b7d60d923c Mon Sep 17 00:00:00 2001 From: Johannes Bechberger Date: Fri, 11 Jul 2025 14:35:39 +0200 Subject: [PATCH 19/21] Update version script --- .github/workflows/release.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8314107..2bc11d3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -125,7 +125,7 @@ jobs: - name: Generate plugin repository YAML env: - GITHUB_REF_NAME: v${{ github.event.inputs.version }} + GITHUB_REF_NAME: ${{ github.event.inputs.version }} run: | source venv/bin/activate echo "๐Ÿ“ Generating plugin repository YAML file for version ${{ github.event.inputs.version }}..." @@ -145,14 +145,14 @@ jobs: - name: Create GitHub Release uses: softprops/action-gh-release@v1 with: - tag_name: v${{ github.event.inputs.version }} - name: Release v${{ github.event.inputs.version }} + tag_name: ${{ github.event.inputs.version }} + name: ${{ github.event.inputs.version }} files: | dist/* plugin-repo-entry.yml plugin-repo-summary.txt body: | - ## CF CLI Java Plugin v${{ github.event.inputs.version }} + ## CF CLI Java Plugin ${{ github.event.inputs.version }} Plugin for profiling Java applications and getting heap and thread-dumps. @@ -176,15 +176,15 @@ jobs: ### Manual Installation - Download this specific release (v${{ github.event.inputs.version }}) and install manually: + Download this specific release (${{ github.event.inputs.version }}) and install manually: ```bash # on Mac arm64 - cf install-plugin https://github.com/SAP/cf-cli-java-plugin/releases/download/v${{ github.event.inputs.version }}/cf-cli-java-plugin-macos-arm64 + cf install-plugin https://github.com/SAP/cf-cli-java-plugin/releases/download/${{ github.event.inputs.version }}/cf-cli-java-plugin-macos-arm64 # on Windows x86 - cf install-plugin https://github.com/SAP/cf-cli-java-plugin/releases/download/v${{ github.event.inputs.version }}/cf-cli-java-plugin-windows-amd64 + cf install-plugin https://github.com/SAP/cf-cli-java-plugin/releases/download/${{ github.event.inputs.version }}/cf-cli-java-plugin-windows-amd64 # on Linux x86 - cf install-plugin https://github.com/SAP/cf-cli-java-plugin/releases/download/v${{ github.event.inputs.version }}/cf-cli-java-plugin-linux-amd64 + cf install-plugin https://github.com/SAP/cf-cli-java-plugin/releases/download/${{ github.event.inputs.version }}/cf-cli-java-plugin-linux-amd64 ``` Or download the latest release: @@ -209,7 +209,7 @@ jobs: - name: Create Summary Comment run: | - echo "## ๐Ÿš€ Release v${{ github.event.inputs.version }} Created Successfully!" >> $GITHUB_STEP_SUMMARY + echo "## ๐Ÿš€ Release ${{ github.event.inputs.version }} Created Successfully!" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY echo "### Files Generated:" >> $GITHUB_STEP_SUMMARY echo "- Release binaries for all platforms" >> $GITHUB_STEP_SUMMARY From 69086dd2afaa3e55ef3662be690dfb680f9f43d7 Mon Sep 17 00:00:00 2001 From: Johannes Bechberger Date: Fri, 11 Jul 2025 14:40:53 +0200 Subject: [PATCH 20/21] Update version script --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2bc11d3..d53a346 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: # Allows manual triggering inputs: version: - description: 'Release version (e.g., 3.0.4)' + description: 'Release version (e.g., 3.0.4), you must have a changelog ready for this version (e.h. 3.0.4-snapshot-20231001)' required: true type: string From d44e0ba2c972807af70f5e183c80644e2bfa1b40 Mon Sep 17 00:00:00 2001 From: Johannes Bechberger Date: Fri, 11 Jul 2025 15:00:40 +0200 Subject: [PATCH 21/21] Update version script --- .github/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d53a346..29094a4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -108,9 +108,9 @@ jobs: - name: Create and push tag run: | VERSION="${{ github.event.inputs.version }}" - echo "Creating tag v$VERSION" - git tag "v$VERSION" - git push origin "v$VERSION" + echo "Creating tag $VERSION" + git tag "$VERSION" + git push origin "$VERSION" - name: Download all build artifacts uses: actions/download-artifact@v4