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
41 changes: 41 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Publish to PyPI

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # setuptools-scm needs the full history and tags

- uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Build sdist and wheel
run: |
python -m pip install --upgrade pip build
python -m build

- uses: actions/upload-artifact@v4
with:
name: dist
path: dist/

publish:
needs: build
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write # Trusted Publishing (OIDC)
steps:
- uses: actions/download-artifact@v4
with:
name: dist
path: dist/

- uses: pypa/gh-action-pypi-publish@release/v1
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools>=64", "setuptools-scm>=8"]
build-backend = "setuptools.build_meta"
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
MAINTAINER_EMAIL = "edsonporto88@gmail.com"
URL = "https://github.com/edsonportosilva/OptiCommPy"
LICENSE = "GPL-3.0 license"
VERSION = "0.11.0"

# This is a list of files to install, and where
# (relative to the 'root' dir, where setup.py is)
Expand All @@ -25,7 +24,8 @@
description=DESCRIPTION,
license=LICENSE,
url=URL,
version=VERSION,
# version is derived from the Git tag of the release (setuptools-scm)
use_scm_version={"fallback_version": "0.11.0"},
# Name the folder where your packages live:
# (If you have other packages (dirs) or modules (py files) then
# put them into the package directory - they will be found
Expand Down
Loading