diff --git a/.github/workflows/release_python.yml b/.github/workflows/release_python.yml index 170869419d..ca98de1a7a 100644 --- a/.github/workflows/release_python.yml +++ b/.github/workflows/release_python.yml @@ -87,16 +87,19 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install cargo-edit + - name: Install toml-cli if: ${{ needs.validate-release-tag.outputs.is-rc == 'true' }} - run: cargo install cargo-edit + run: cargo install toml-cli - name: Set cargo version for RC if: ${{ needs.validate-release-tag.outputs.is-rc == 'true' }} working-directory: "bindings/python" run: | echo "Setting cargo version to: ${{ needs.validate-release-tag.outputs.cargo-version }}" - cargo set-version ${{ needs.validate-release-tag.outputs.cargo-version }} + toml set Cargo.toml package.version ${{ needs.validate-release-tag.outputs.cargo-version }} > Cargo.toml.tmp + # doing this explicitly to avoid issue in Windows where `mv` does not overwrite existing file + rm Cargo.toml + mv Cargo.toml.tmp Cargo.toml - uses: PyO3/maturin-action@v1 with: @@ -127,16 +130,19 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Install cargo-edit + - name: Install toml-cli if: ${{ needs.validate-release-tag.outputs.is-rc == 'true' }} - run: cargo install cargo-edit + run: cargo install toml-cli - name: Set cargo version for RC if: ${{ needs.validate-release-tag.outputs.is-rc == 'true' }} working-directory: "bindings/python" run: | echo "Setting cargo version to: ${{ needs.validate-release-tag.outputs.cargo-version }}" - cargo set-version ${{ needs.validate-release-tag.outputs.cargo-version }} + toml set Cargo.toml package.version ${{ needs.validate-release-tag.outputs.cargo-version }} > Cargo.toml.tmp + # doing this explicitly to avoid issue in Windows where `mv` does not overwrite existing file + rm Cargo.toml + mv Cargo.toml.tmp Cargo.toml - uses: actions/setup-python@v5 with: