sdk: v24.12.0 #915
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
name: Python Publish to PYPI | |
on: | |
release: | |
types: published | |
workflow_dispatch: | |
inputs: | |
ref: | |
description: 'commit/tag/branch to release from' | |
required: true | |
defaults: | |
run: | |
shell: bash | |
working-directory: python/ | |
jobs: | |
publish: | |
if: > | |
(github.event.inputs) || | |
(startsWith(github.event.release.tag_name, 'looker_sdk') && | |
!github.event.release.draft && | |
!github.event.release.prerelease) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.release.tag_name || github.event.inputs.ref }} | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Package release artifacts | |
run: | | |
pip install wheel | |
python setup.py sdist bdist_wheel | |
- uses: pypa/[email protected] | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
packages_dir: python/dist/ |