Skip to content

publish

publish #46

Workflow file for this run

name: publish
on:
push:
tags:
- v*
workflow_run:
workflows: [buildtest]
types:
- completed
jobs:
publish:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/MachineState
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
name: Set up Python
- name: Pre-Install (generic)
run: |
python -m pip install build
python -m pip install setuptools
python -m pip install --upgrade pip
- name: Build package
run: |
python -m build --wheel --sdist
- name: Publish to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip_existing: true
user: __token__
password: ${{ secrets.pypi_password }}