Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/actions/overwrite-package-version/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
# under the License.

name: 'Update Package Version'
description: 'Updates pyproject.toml version with timestamp'
description: 'Updates pyproject.toml version with a provided timestamp'
inputs:
timestamp:
description: 'Timestamp to override to the package version'
required: true
runs:
using: "composite"
steps:
Expand All @@ -33,8 +37,7 @@ runs:
shell: bash
run: |
CURRENT_VERSION=$(python -c "import toml; print(toml.load('bindings/python/pyproject.toml')['project']['version'])")
TIMESTAMP=$(date +%Y%m%d%H%M%S)
NEW_VERSION="${CURRENT_VERSION}.dev${TIMESTAMP}"
NEW_VERSION="${CURRENT_VERSION}.dev${{ inputs.timestamp }}"
NEW_VERSION=$NEW_VERSION python -c "
import toml
import os
Expand Down
27 changes: 24 additions & 3 deletions .github/workflows/release_python_nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,40 @@ permissions:
contents: read

jobs:
set-version:
runs-on: ubuntu-latest
outputs:
timestamp: ${{ steps.set-ts.outputs.TIMESTAMP }}
steps:
- name: Generate version timestamp
id: set-ts
run: echo "TIMESTAMP=$(date +'%Y%m%d%H%M%S')" >> "$GITHUB_OUTPUT"

sdist:
needs: set-version
if: github.repository == 'apache/iceberg-rust' # Only run for apache repo
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: ./.github/actions/overwrite-package-version # overwrite the pacakge version with current timestamp

- uses: ./.github/actions/overwrite-package-version # Overwrite package version with timestamp
with:
timestamp: ${{ needs.set-version.outputs.TIMESTAMP }}

- uses: PyO3/maturin-action@v1
with:
working-directory: "bindings/python"
command: sdist
args: -o dist

- name: Upload sdist
uses: actions/upload-artifact@v4
with:
name: wheels-sdist
path: bindings/python/dist

wheels:
needs: set-version
if: github.repository == 'apache/iceberg-rust' # Only run for apache repo
runs-on: "${{ matrix.os }}"
strategy:
Expand All @@ -61,21 +75,28 @@ jobs:
- { os: ubuntu-latest, target: "armv7l" }
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/overwrite-package-version # overwrite the pacakge version with current timestamp

- uses: ./.github/actions/overwrite-package-version # Overwrite package version with timestamp
with:
timestamp: ${{ needs.set-version.outputs.TIMESTAMP }}

- uses: actions/setup-python@v5
with:
python-version: 3.9

- name: Setup Rust toolchain
uses: ./.github/actions/setup-builder
with:
rust-version: ${{ env.rust_msrv }}

- uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
manylinux: ${{ matrix.manylinux || 'auto' }}
working-directory: "bindings/python"
command: build
args: --release -o dist

- name: Upload wheels
uses: actions/upload-artifact@v4
with:
Expand Down
Loading