mirror of
https://github.com/onyx-and-iris/xair-api-python.git
synced 2026-02-14 17:57:47 +00:00
54 lines
1.0 KiB
YAML
54 lines
1.0 KiB
YAML
name: Publish to PyPI
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
push:
|
|
tags:
|
|
- 'v*.*.*'
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Install Poetry
|
|
run: |
|
|
pip install poetry==2.3.1
|
|
poetry --version
|
|
|
|
- name: Build package
|
|
run: |
|
|
poetry install --only-root
|
|
poetry build
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: dist
|
|
path: ./dist
|
|
|
|
pypi-publish:
|
|
needs: build
|
|
name: Upload release to PyPI
|
|
runs-on: ubuntu-latest
|
|
environment:
|
|
name: pypi
|
|
url: https://pypi.org/p/xair-api
|
|
permissions:
|
|
id-token: write
|
|
steps:
|
|
- uses: actions/download-artifact@v4
|
|
with:
|
|
name: dist
|
|
path: ./dist
|
|
|
|
- name: Publish package distributions to PyPI
|
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
with:
|
|
packages-dir: ./dist
|