Skip to content

Merge pull request #18 from aaghamohammadi/dev #32

Merge pull request #18 from aaghamohammadi/dev

Merge pull request #18 from aaghamohammadi/dev #32

Workflow file for this run

name: Publish
on:
push:
branches:
- 'main'
tags:
- 'v*'
jobs:
build_source_dist:
name: Build source distribution
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install build
run: python -m pip install build
- name: Run build
run: python -m build --sdist
- uses: actions/upload-artifact@v3
with:
path: ./dist/*.tar.gz
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, windows-2022, macos-13]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install build
run: python -m pip install build
- name: Build wheels
run: python -m build --wheel
- uses: actions/upload-artifact@v3
with:
path: ./dist/*.whl
publish:
name: Publish package
if: startsWith(github.event.ref, 'refs/tags/v')
needs:
- build_source_dist
- build_wheels
runs-on: ubuntu-22.04
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: ./dist
- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}