Skip to content

Commit

Permalink
GitHub action to release package to PyPi
Browse files Browse the repository at this point in the history
  • Loading branch information
pbchekin committed Dec 19, 2023
1 parent 72a7492 commit 28a89e6
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Release

on:
push:
tags:
- "v*"

jobs:
build-release:
name: Build Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8

- name: Install packages
run: |
python -m pip install --upgrade pip build
python -m pip install -e .
- name: Build a binary wheel and a source tarball
run: |
python -m build --sdist --wheel --outdir dist/
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
verbose: true
9 changes: 9 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,12 @@ dependencies = [
tests = [
"pytest",
]

[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[tool.setuptools.packages.find]
where = ["src"]
include = ["p9fs*", "py9p*"]
namespaces = false

0 comments on commit 28a89e6

Please sign in to comment.