Skip to content

Fix release workflow to update studio/package.json version#2688

Merged
robfrank merged 3 commits intomainfrom
copilot/update-studio-version-in-workflow
Oct 21, 2025
Merged

Fix release workflow to update studio/package.json version#2688
robfrank merged 3 commits intomainfrom
copilot/update-studio-version-in-workflow

Conversation

Copy link
Contributor

Copilot AI commented Oct 21, 2025

Problem

The Maven release workflow (mvn-release.yml) only updated version numbers in Maven pom.xml files using mvn versions:set, but did not update the version in studio/package.json. This caused the studio package version to drift out of sync with the Maven project version over time.

Solution

Added two new workflow steps to automatically update studio/package.json during the release process:

  1. After setting the release version: Updates studio/package.json to match the release version, ensuring the change is committed alongside the pom.xml updates
  2. After setting the next development version: Updates studio/package.json to match the next development version, keeping versions synchronized

Implementation

The solution uses jq to directly modify the JSON file:

jq --arg version "$VERSION" '.version = $version' package.json > package.json.tmp
mv package.json.tmp package.json

Why jq instead of npm version?

  • npm version triggers lifecycle hooks defined in package.json (security checks, builds, git operations)
  • These hooks are unnecessary during the release workflow as builds and checks happen separately
  • jq provides clean, direct JSON manipulation without side effects
  • Available by default in GitHub Actions Ubuntu runners

Example

When the workflow runs with:

  • releaseversion: "25.9.0"
  • nextversion: "25.9.1-SNAPSHOT"

Results:

  • Release commit: All pom.xml files and studio/package.json will have version 25.9.0
  • Next version commit: All pom.xml files and studio/package.json will have version 25.9.1-SNAPSHOT

This ensures perfect version synchronization across Maven and npm packages throughout the entire release process.

Testing

  • ✅ YAML syntax validated
  • ✅ Local simulation with release and SNAPSHOT versions
  • ✅ CodeQL security scan passed
  • ✅ Minimal changes - only workflow file modified

Fixes #<issue_number>

Original prompt

This section details on the original issue you should resolve

<issue_title>Release workflow: update package.json in studio</issue_title>
<issue_description>
The https://github.com/ArcadeData/arcadedb/blob/main/.github/workflows/mvn-release.yml doen't change the version of studio in package.json , it only works with maven

Improve the workflow to set the version of studio using the releaseversion input param</issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #2495


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@mergify
Copy link
Contributor

mergify bot commented Oct 21, 2025

🧪 CI Insights

Here's what we observed from your CI run for 71d3b55.

🟢 All jobs passed!

But CI Insights is watching 👀

Copilot AI changed the title [WIP] Update release workflow to change studio version in package.json Fix release workflow to update studio/package.json version Oct 21, 2025
Copilot AI requested a review from robfrank October 21, 2025 14:47
@codacy-production
Copy link

codacy-production bot commented Oct 21, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.01%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (732d083) 73090 46413 63.50%
Head commit (71d3b55) 73090 (+0) 46421 (+8) 63.51% (+0.01%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#2688) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

@robfrank robfrank marked this pull request as ready for review October 21, 2025 18:20
@robfrank robfrank merged commit 3038684 into main Oct 21, 2025
30 of 33 checks passed
tae898 pushed a commit to humemai/arcadedb-embedded-python that referenced this pull request Oct 23, 2025
robfrank pushed a commit that referenced this pull request Nov 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Release workflow: update package.json in studio

2 participants