Skip to content

Release fix: Upload nuxeo-python-client to packages #2

Release fix: Upload nuxeo-python-client to packages

Release fix: Upload nuxeo-python-client to packages #2

Workflow file for this run

name: Release (Upload to Packages)
on:
workflow_dispatch:
inputs:
branch:
description: "The branch, tag or SHA to release from"
required: true
default: "release-fix"
push:
branches: [release-fix]
paths:
- ".github/workflows/release_package.yml"
jobs:
pure-built-distribution:
name: Build pure wheel
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}
- uses: actions/setup-python@v5
with:
python-version: 3.9
- run: python -m pip install -U pip setuptools wheel
- run: python setup.py bdist_wheel
- uses: actions/upload-artifact@v3
with:
name: python-package-distributions
path: ./dist/*.whl
source-distribution:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch }}
- uses: actions/setup-python@v5
with:
python-version: 3.9
- run: python setup.py sdist
- uses: actions/upload-artifact@v3
with:
name: python-package-distributions
path: dist
publish:
needs:
- pure-built-distribution
- source-distribution
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- run: ls -l dist
- name: Set-up Python
uses: actions/setup-python@v5
with:
python-version: 3.9
- name: Install twine
run: python -m pip install twine
- name: Upload Python Client on Packages
run: python -m twine upload --repository-url https://packages.nuxeo.com/repository/pypi-public/ -u "${{ secrets.PACKAGE_USERNAME }}" -p "${{ secrets.PACKAGE_TOKEN }}" dist/*