Skip to content

Use trusted publisher #68

Use trusted publisher

Use trusted publisher #68

Workflow file for this run

name: Deploy Conda packages and Python wheels
on: [push]
# 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.12"
- id: build-python-wheel
uses: ./.github/actions/build-python-wheel
- uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: jdk4py-${{ matrix.runner }}-python-wheel
path: dist/
# - id: build-conda-packages
# uses: ./.github/actions/build-conda-packages
# - uses: actions/upload-artifact@v4
# with:
# if-no-files-found: error
# name: jdk4py-${{ steps.build-conda-packages.outputs.platform }}-conda-packages
# path: dist/${{ steps.build-conda-packages.outputs.platform }}/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/
- 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 }}
# JDK4PY_CONDA_PLATFORM: ${{ steps.build-conda-packages.outputs.platform }}
# run: |
# ls dist/$JDK4PY_CONDA_PLATFORM/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/$JDK4PY_CONDA_PLATFORM/"
# done
# shell: bash
# - name: Publish Python wheels
# uses: pypa/gh-action-pypi-publish@release/v1