|
8 | 8 | required: true |
9 | 9 | type: string |
10 | 10 |
|
| 11 | +permissions: |
| 12 | + contents: write |
| 13 | + actions: read |
| 14 | + |
11 | 15 | jobs: |
12 | 16 | release: |
13 | 17 | name: Create Proper Release on All Platforms |
|
62 | 66 | steps: |
63 | 67 | - name: Checkout code |
64 | 68 | uses: actions/checkout@v3 |
| 69 | + with: |
| 70 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 71 | + fetch-depth: 0 |
65 | 72 |
|
66 | 73 | - name: Set up Python |
67 | 74 | uses: actions/setup-python@v4 |
|
75 | 82 | python3 -m pip install --upgrade pip |
76 | 83 | pip install PyYAML requests |
77 | 84 |
|
| 85 | + - name: Parse version and update Go source |
| 86 | + run: | |
| 87 | + # Parse version input (e.g., "4.1.0" -> major=4, minor=1, build=0) |
| 88 | + VERSION="${{ github.event.inputs.version }}" |
| 89 | + IFS='.' read -r MAJOR MINOR BUILD <<< "$VERSION" |
| 90 | + |
| 91 | + echo "Updating version to $MAJOR.$MINOR.$BUILD" |
| 92 | + python3 .github/workflows/update_version.py "$MAJOR" "$MINOR" "$BUILD" |
| 93 | + |
| 94 | + # Configure git |
| 95 | + git config --local user.email "action@github.com" |
| 96 | + git config --local user.name "GitHub Action" |
| 97 | + |
| 98 | + # Check if there are changes |
| 99 | + if git diff --quiet; then |
| 100 | + echo "No version changes detected" |
| 101 | + else |
| 102 | + echo "Committing version update" |
| 103 | + git add cf_cli_java_plugin.go README.md |
| 104 | + git commit -m "Set version to v$VERSION" |
| 105 | + git push |
| 106 | + fi |
| 107 | +
|
| 108 | + - name: Create and push tag |
| 109 | + run: | |
| 110 | + VERSION="${{ github.event.inputs.version }}" |
| 111 | + echo "Creating tag v$VERSION" |
| 112 | + git tag "v$VERSION" |
| 113 | + git push origin "v$VERSION" |
| 114 | +
|
78 | 115 | - name: Download all build artifacts |
79 | 116 | uses: actions/download-artifact@v3 |
80 | 117 | with: |
@@ -119,6 +156,10 @@ jobs: |
119 | 156 | |
120 | 157 | Plugin for profiling Java applications and getting heap and thread-dumps. |
121 | 158 | |
| 159 | + ## Changes |
| 160 | + |
| 161 | + $(cat release_changelog.txt || echo "No changelog available") |
| 162 | + |
122 | 163 | ## Installation |
123 | 164 |
|
124 | 165 | ### Installation via CF Community Repository |
|
0 commit comments