mirror of
https://github.com/d3vyce/teleinfo-exporter.git
synced 2025-04-05 01:30:49 +02:00
37 lines
845 B
YAML
37 lines
845 B
YAML
name: Build Pypi Package
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install --yes python3-setuptools python3-wheel
|
|
- 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
|