teleinfo-exporter/.github/workflows/pypi-build-version.yml
2023-12-19 23:06:38 +01:00

39 lines
923 B
YAML

name: Build Pypi Package
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade build
- name: Build
run: python3 -m build
- uses: actions/upload-artifact@v3
with:
path: ./dist
name: dist
pypi-publish:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/teleinfo_exporter/
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v3
with:
path: ./dist
name: dist
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1