diff --git a/.github/workflows/release-please-beta.yml b/.github/workflows/release-please-beta.yml index 5db96823..a6356d91 100644 --- a/.github/workflows/release-please-beta.yml +++ b/.github/workflows/release-please-beta.yml @@ -35,38 +35,3 @@ jobs: echo "" >> $GITHUB_STEP_SUMMARY echo "Docker images will be built and tagged with this beta version." >> $GITHUB_STEP_SUMMARY - # Sync version to package.json files after release - sync-versions: - needs: release-please - if: ${{ needs.release-please.outputs.release_created }} - runs-on: ubuntu-latest - permissions: - contents: write - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - ref: beta - - - name: Update package.json versions - run: | - VERSION="${{ needs.release-please.outputs.version }}" - echo "Updating package.json files to version $VERSION" - - # Update backend package.json - cd backend - npm version $VERSION --no-git-tag-version --allow-same-version - cd .. - - # Update frontend package.json - cd frontend - npm version $VERSION --no-git-tag-version --allow-same-version - cd .. - - - name: Commit version updates - run: | - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - git add backend/package.json frontend/package.json - git diff --staged --quiet || git commit -m "chore: sync package.json versions to ${{ needs.release-please.outputs.version }}" - git push diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index b5973685..f7a148f3 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -34,38 +34,3 @@ jobs: echo "" >> $GITHUB_STEP_SUMMARY echo "Docker images will be built and tagged with this version." >> $GITHUB_STEP_SUMMARY - # Sync version to package.json files after release - sync-versions: - needs: release-please - if: ${{ needs.release-please.outputs.release_created }} - runs-on: ubuntu-latest - permissions: - contents: write - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - ref: main - - - name: Update package.json versions - run: | - VERSION="${{ needs.release-please.outputs.version }}" - echo "Updating package.json files to version $VERSION" - - # Update backend package.json - cd backend - npm version $VERSION --no-git-tag-version --allow-same-version - cd .. - - # Update frontend package.json - cd frontend - npm version $VERSION --no-git-tag-version --allow-same-version - cd .. - - - name: Commit version updates - run: | - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - git add backend/package.json frontend/package.json - git diff --staged --quiet || git commit -m "chore: sync package.json versions to ${{ needs.release-please.outputs.version }}" - git push diff --git a/release-please-config-beta.json b/release-please-config-beta.json index 8cff4c7f..3e739ccf 100644 --- a/release-please-config-beta.json +++ b/release-please-config-beta.json @@ -24,7 +24,18 @@ ".": { "release-type": "simple", "changelog-path": "CHANGELOG.md", - "extra-files": [] + "extra-files": [ + { + "type": "json", + "path": "backend/package.json", + "jsonpath": "$.version" + }, + { + "type": "json", + "path": "frontend/package.json", + "jsonpath": "$.version" + } + ] } } } diff --git a/release-please-config.json b/release-please-config.json index f8d91885..124f25fe 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -22,7 +22,18 @@ ".": { "release-type": "simple", "changelog-path": "CHANGELOG.md", - "extra-files": [] + "extra-files": [ + { + "type": "json", + "path": "backend/package.json", + "jsonpath": "$.version" + }, + { + "type": "json", + "path": "frontend/package.json", + "jsonpath": "$.version" + } + ] } } }