diff --git a/.github/workflows/on-push-main.yml b/.github/workflows/on-push-main.yml index 5ad3e9a..9bf1454 100644 --- a/.github/workflows/on-push-main.yml +++ b/.github/workflows/on-push-main.yml @@ -34,40 +34,10 @@ jobs: config-file: release-please-config.json manifest-file: .release-please-manifest.json - # Sync VERSION file with release tag. - # This ensures the VERSION file is updated before the release build is triggered, - # so binaries built from the release have the correct version number. - sync-version: - name: Sync VERSION File - needs: release-please - if: needs.release-please.outputs.release_created == 'true' - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - token: ${{ secrets.REPO_WRITE_PACKAGES_PAT }} - - - name: Update VERSION file - run: | - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - - # Pull latest changes (release commit) before modifying VERSION - git pull --rebase origin main - - VERSION="${{ needs.release-please.outputs.tag_name }}" - VERSION="${VERSION#v}" # Strip 'v' prefix - echo "$VERSION" > VERSION - - git add VERSION - git commit -m "chore: sync VERSION file with release $VERSION" - git push - # Trigger release workflow after successful release trigger-release: name: Trigger Release Build - needs: [release-please, sync-version] + needs: release-please if: needs.release-please.outputs.release_created == 'true' runs-on: ubuntu-latest steps: diff --git a/release-please-config.json b/release-please-config.json index 4c580a4..b7a06ce 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -4,11 +4,8 @@ "release-type": "simple", "bump-minor-pre-major": true, "bump-patch-for-minor-pre-major": true, + "version-file": "VERSION", "extra-files": [ - { - "type": "generic", - "path": "VERSION" - }, { "type": "toml", "path": "Cargo.toml",