build: bump version to 0.1.0-rc.1 #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Licensed to the Apache Software Foundation (ASF) under one | |
# or more contributor license agreements. See the NOTICE file | |
# distributed with this work for additional information | |
# regarding copyright ownership. The ASF licenses this file | |
# to you under the Apache License, Version 2.0 (the | |
# "License"); you may not use this file except in compliance | |
# with the License. You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, | |
# software distributed under the License is distributed on an | |
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
# KIND, either express or implied. See the License for the | |
# specific language governing permissions and limitations | |
# under the License. | |
name: Publish artifacts | |
on: | |
push: | |
tags: | |
- 'release-[0-9]+.[0-9]+.[0-9]+**' | |
jobs: | |
validate-release-tag: | |
name: Validate git tag | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: compare git tag with cargo metadata | |
run: | | |
CURR_VER=$( grep version Cargo.toml | head -n 1 | awk '{print $3}' | tr -d '"' ) | |
if [[ "${GITHUB_REF_NAME}" != "release-${CURR_VER}" ]]; then | |
echo "Pushed tag ${GITHUB_REF_NAME} does not match with the Cargo package version ${CURR_VER}." | |
exit 1 | |
fi | |
release-crates: | |
name: Release to crates.io | |
needs: validate-release-tag | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 1 | |
matrix: | |
# order matters here as later crates depend on previous ones | |
package: | |
- "hudi-core" | |
- "hudi-datafusion" | |
- "hudi" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: cargo publish | |
uses: actions-rs/cargo@v1 | |
env: | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
with: | |
command: publish | |
args: -p ${{ matrix.package }} --all-features | |
release-pypi-mac: | |
name: PyPI release on Mac | |
needs: validate-release-tag | |
strategy: | |
fail-fast: false | |
matrix: | |
target: [ x86_64-apple-darwin, aarch64-apple-darwin ] | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Publish to pypi (without sdist) | |
uses: PyO3/maturin-action@v1 | |
env: | |
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | |
MATURIN_REPOSITORY: pypi | |
with: | |
target: ${{ matrix.target }} | |
command: publish | |
args: --skip-existing -m python/Cargo.toml --no-sdist | |
release-pypi-windows: | |
name: PyPI release on Windows | |
needs: validate-release-tag | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Publish to pypi (without sdist) | |
uses: PyO3/maturin-action@v1 | |
env: | |
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | |
MATURIN_REPOSITORY: pypi | |
with: | |
target: x86_64-pc-windows-msvc | |
command: publish | |
args: --skip-existing -m python/Cargo.toml --no-sdist | |
release-pypi-manylinux: | |
name: PyPI release manylinux | |
needs: validate-release-tag | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Publish manylinux to pypi x86_64 (with sdist) | |
uses: PyO3/maturin-action@v1 | |
env: | |
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | |
MATURIN_REPOSITORY: pypi | |
with: | |
target: x86_64-unknown-linux-gnu | |
command: publish | |
args: --skip-existing -m python/Cargo.toml | |
# for openssl build | |
before-script-linux: yum install -y perl-IPC-Cmd | |
- name: Publish manylinux to pypi aarch64 (without sdist) | |
uses: PyO3/maturin-action@v1 | |
env: | |
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | |
MATURIN_REPOSITORY: pypi | |
with: | |
target: aarch64-unknown-linux-gnu | |
command: publish | |
args: --skip-existing -m python/Cargo.toml --no-sdist | |
before-script-linux: | | |
# We can remove this once we upgrade to 2_28. | |
# https://github.com/briansmith/ring/issues/1728 | |
export CFLAGS_aarch64_unknown_linux_gnu="-D__ARM_ARCH=8" |