Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: build-wheel-and-publish-pypi

on:
push:
pull_request:
types: [opened, synchronize, reopened]

jobs:
build:
name: Build distribution
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
- name: Install pypa/build
run: >-
python3 -m pip install pip setuptools wheel build
- name: Build a binary wheel and a source tarball
run: python3 -m build .
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/

publish-to-pypi:
name: Publish waveform-editor distribution to PyPI
if: startsWith(github.ref, 'refs/tags/') && github.repository_owner == 'iterorganization' # only publish to PyPI on tag pushes
needs:
- build
runs-on: ubuntu-22.04
environment:
name: pypi
url: https://pypi.org/p/waveform-editor
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "waveform-editor"
description = "Python tool to create and edit 1D waveforms (time-varying signals)"
readme = "README.rst"
readme = {file = "README.md", content-type = "text/markdown"}
authors = [
{name = "Waveform Editor Developers"}
]
Expand Down Expand Up @@ -61,7 +61,8 @@ include = ["waveform_editor*"]
waveform-editor = "waveform_editor.cli:cli"

[tool.setuptools_scm]
# version_file = "waveform_editor/_version.py"
#version_file = "waveform_editor/_version.py"
local_scheme = "no-local-version"

[tool.isort]
line_length = 88
Expand Down
Loading