Updating package #45
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: Publish to PyPI | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'opol/python-client/**' | |
jobs: | |
build: | |
name: Build Package | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: python -m pip install --upgrade build | |
- name: Build package | |
run: | | |
cd opol/python-client | |
python -m build | |
- name: Upload dist artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dist | |
path: opol/python-client/dist | |
publish: | |
name: Upload release to PyPI | |
runs-on: ubuntu-latest | |
needs: build | |
environment: pypi # Optional but recommended | |
permissions: | |
id-token: write # Mandatory for Trusted Publishing | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Download dist artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: dist | |
path: opol/python-client/dist | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: opol/python-client/dist |