Skip to content

Build and Publish Python package #30

Build and Publish Python package

Build and Publish Python package #30

Workflow file for this run

# This workflow will upload a Python Package to PyPI when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Build and publish Python package
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
id-token: write
environment:
name: pypi
url: https://pypi.org/project/rps-engine-client-python/
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11.9"
- name: Install Poetry
run: |
python -m pip install --upgrade pip
pip install "poetry==1.7.1" poetry-dynamic-versioning
- name: Install dependencies
# run: poetry install
run: poetry install --directory Client
# working-directory: Client
- name: Check Git tags
run: git tag
# working-directory: Client
# - name: Poetry Plugin List
# run: poetry self show plugins
# run: poetry -C Client self show plugins
# # working-directory: Client
- name: Build package
run: poetry build
- name: Move dist to root
run: mv Client/dist ./dist
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1