Skip to content

Publish with uv and add support for Python 3.13 (#82) #75

Publish with uv and add support for Python 3.13 (#82)

Publish with uv and add support for Python 3.13 (#82) #75

Workflow file for this run

name: Deploy Conda packages and Python wheels
on:
push:
branches:
- main
jobs:
build:
name: Build on ${{ matrix.runner }}
runs-on: ${{ matrix.runner }}
strategy:
matrix:
runner:
- macos-13 # x64
- macos-14 # arm64
- ubuntu-24.04
- ubuntu-24.04-arm64 # GitHub-hosted larger runner in the ActiveViam organization.
- windows-2022
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/build-java-runtime
with:
python-version: "3.10"
- run: uv build --wheel
- uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: jdk4py-${{ matrix.runner }}-python-wheel
path: dist/jdk4py-*.whl
- uses: ./.github/actions/build-conda-packages
- uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: jdk4py-${{ matrix.runner }}-conda-packages
path: dist/*/jdk4py-*.tar.bz2
publish:
environment: deployment
name: Publish Conda packages and Python wheels
needs: build
runs-on: ubuntu-24.04
permissions:
# Required for trusted publishing.
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
merge-multiple: true
path: dist/
- if: ${{ runner.debug == '1' }}
name: List Conda packages and Python wheels
run: ls -R dist/
- name: Publish Conda packages
env:
JDK4PY_CONDA_CHANNEL_TOKEN: ${{ secrets.CONDA_CHANNEL_TOKEN }}
JDK4PY_CONDA_CHANNEL_URL: ${{ vars.CONDA_CHANNEL_URL }}
JDK4PY_CONDA_CHANNEL_USERNAME: ${{ vars.CONDA_CHANNEL_USERNAME }}
run: |
cd dist/
ls */jdk4py-*.tar.bz2 | \
while read filepath; do
echo Uploading ${filepath}
curl --fail --user "$JDK4PY_CONDA_CHANNEL_USERNAME":"$JDK4PY_CONDA_CHANNEL_TOKEN" --upload-file ${filepath} "$JDK4PY_CONDA_CHANNEL_URL/$(dirname $filepath)/"
done
shell: bash
- name: Publish Python wheels
run: uv publish