|
4 | 4 | workflow_dispatch: |
5 | 5 | workflow_call: |
6 | 6 |
|
| 7 | +permissions: |
| 8 | + contents: write |
| 9 | + |
7 | 10 | env: |
8 | 11 | AWS_ACCESS_KEY_ID: ${{ secrets.CDN_S3_ACCESS_KEY }} |
9 | 12 | AWS_SECRET_ACCESS_KEY: ${{ secrets.CDN_S3_SECRET_KEY }} |
@@ -35,21 +38,45 @@ jobs: |
35 | 38 | jar_file="spring-boot-language-server-standalone-exec.jar" |
36 | 39 | s3_path=snapshot/language-server/spring-boot |
37 | 40 | echo "S3 path: ${s3_path}" |
38 | | - aws s3 rm s3://$AWS_S3_BUCKET/$s3_path/ --recursive |
39 | 41 | aws s3 cp ./standalone-ls-dist/$jar_file s3://$AWS_S3_BUCKET/$s3_path/$jar_file --no-progress --checksum-algorithm CRC32 |
| 42 | + - name: Update plugin.json for Snapshot |
| 43 | + id: update-plugin |
| 44 | + run: | |
| 45 | + git config --global user.name "@spring-projects/spring-ide-admin" |
| 46 | + git config --global user.email "spring-ide-admin@users.noreply.github.com" |
| 47 | + |
| 48 | + version=$(cat ./standalone-ls-dist/version.txt) |
| 49 | + |
| 50 | + # Create or reset a local branch to the current commit (which is what triggered the action) |
| 51 | + git checkout -B claude-snapshot |
| 52 | + |
| 53 | + # Update the version in plugin.json |
| 54 | + tmp=$(mktemp) |
| 55 | + jq --arg v "$version" '.version = $v' claude-plugins/spring-boot/.claude-plugin/plugin.json > "$tmp" && mv "$tmp" claude-plugins/spring-boot/.claude-plugin/plugin.json |
| 56 | + |
| 57 | + git add claude-plugins/spring-boot/.claude-plugin/plugin.json |
| 58 | + git commit -m "Update Claude plugin version to $version" |
| 59 | + |
| 60 | + # Push to the remote claude-snapshot branch forcefully. |
| 61 | + # If it doesn't exist, this creates it. If it does exist, it completely overwrites it |
| 62 | + # to exactly match the current main + this single version bump commit. |
| 63 | + git push origin claude-snapshot --force |
| 64 | + |
| 65 | + echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT |
40 | 66 | - name: Update Marketplace JSON |
41 | 67 | run: | |
42 | 68 | aws s3 cp s3://$AWS_S3_BUCKET/snapshot/claude-plugins/marketplace.json ./marketplace.json || echo '{"name": "spring-tools-snapshots", "description": "Bleeding-edge snapshot builds for Spring Tools Claude Code plugins.", "owner": {"name": "Spring Tools"}, "plugins": []}' > ./marketplace.json |
43 | 69 | |
44 | 70 | version=$(cat ./standalone-ls-dist/version.txt) |
| 71 | + sha="${{ steps.update-plugin.outputs.sha }}" |
45 | 72 | |
46 | 73 | tmp=$(mktemp) |
47 | 74 | jq --arg name "spring-boot" \ |
48 | 75 | --arg version "$version" \ |
49 | | - --arg sha "${{ github.sha }}" \ |
| 76 | + --arg sha "$sha" \ |
50 | 77 | ' |
51 | 78 | .plugins |= if map(.name == $name) | any then |
52 | | - map(if .name == $name then .version=$version | .source.sha=$sha else . end) |
| 79 | + map(if .name == $name then .version=$version | .source.sha=$sha | .source.ref="claude-snapshot" else . end) |
53 | 80 | else |
54 | 81 | . + [{ |
55 | 82 | "name": $name, |
|
58 | 85 | "source": "git-subdir", |
59 | 86 | "url": "https://github.com/spring-projects/spring-tools.git", |
60 | 87 | "path": "claude-plugins/spring-boot", |
61 | | - "ref": "main", |
| 88 | + "ref": "claude-snapshot", |
62 | 89 | "sha": $sha |
63 | 90 | }, |
64 | 91 | "description": "Spring Boot Language Server", |
|
0 commit comments