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