Skip to content

ci: publish to pypi

ci: publish to pypi #1

Workflow file for this run

name: "Publish to pypi"
on:
push:
tags:
- "v*"
jobs:
build:
runs-on: ubuntu-latest
steps:

Check failure on line 12 in .github/workflows/pypi.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/pypi.yml

Invalid workflow file

You have an error in your yaml syntax on line 12
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v3
with:
name: python-package-distributions
path: dist/
publish-to-pypi:
if: startsWith(github.ref, 'refs/tags/')
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/mqtt-exporter
permissions:
id-token: write
steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1