Encode urls (#3) #7
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
# .github/workflows/build-wheels.yml | |
name: Build and Package Wheels | |
on: | |
pull_request: | |
push: | |
env: | |
LIBRDKAFKA_VERSION: v2.6.1-gr | |
jobs: | |
build-linux-x64: | |
name: Build wheels for Linux x64 | |
runs-on: ubuntu-latest | |
env: | |
OS_NAME: linux | |
ARCH: x64 | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build wheels | |
run: | | |
./tools/wheels/build-wheels.sh "${LIBRDKAFKA_VERSION#v}" wheelhouse | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: wheels-${{ env.OS_NAME }}-${{ env.ARCH }} | |
path: wheelhouse/confluent_kafka*.whl | |
build-windows: | |
name: Build wheels for Windows | |
runs-on: windows-latest | |
env: | |
OS_NAME: windows | |
ARCH: x64 | |
CHERE_INVOKING: yes | |
MSYSTEM: UCRT64 | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup MSYS2 | |
uses: msys2/setup-msys2@v2 | |
- name: Build wheels | |
shell: bash | |
run: | | |
./tools/mingw-w64/msys2-dependencies.sh | |
bash tools/mingw-w64/semaphore_commands.sh | |
bash tools/wheels/install-librdkafka.sh ${LIBRDKAFKA_VERSION#v} dest | |
tools/wheels/build-wheels.bat x64 win_amd64 dest wheelhouse | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: wheels-${{ env.OS_NAME }}-${{ env.ARCH }} | |
path: wheelhouse/confluent_kafka*.whl | |
publish_pypi_index: | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | |
name: Build a PyPI-compatible index | |
needs: [build-linux-x64, build-windows] | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
actions: read | |
packages: read | |
pages: write | |
id-token: write | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/download-artifact@v4 | |
with: | |
path: artifacts | |
pattern: wheels-* | |
merge-multiple: true | |
- name: Create release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: | | |
artifacts/confluent_kafka* | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Generate Package Index | |
run: | | |
python -m pip install --upgrade pip | |
pip install PyGithub | |
python .github/scripts/generate_index.py | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
OUTPUT_DIR: dist | |
- name: Upload Site Artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: 'dist' | |
- name: Deploy to GitHub Pages | |
uses: actions/deploy-pages@v4 |