Skip to content

QMFlows 1.0.0

QMFlows 1.0.0 #8

Workflow file for this run

name: Publish
on:
release:
types: [published]
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: pip install build twine
- name: Python info
run: |
which python
python --version
- name: Installed packages
run: pip list
- name: Build the package
run: python -m build --sdist --wheel
- name: Validate wheels
run: |
tree dist
twine check dist/*
- uses: actions/upload-artifact@v3
with:
name: wheels
path: ./dist/*
- name: Publish the package
if: github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.QMFLOWS_PYPI }}
- name: Attach wheels to GitHub release
if: github.event_name == 'release'
uses: AButler/upload-release-assets@v2.0.2
with:
files: 'dist/*'
repo-token: ${{ secrets.GITHUB_TOKEN }}