Skip to content

Commit

Permalink
Merge pull request #4 from skhrg/pypi
Browse files Browse the repository at this point in the history
ci: automatic pypi releases
  • Loading branch information
skhrg authored Nov 10, 2023
2 parents eca20a1 + cd2bfde commit ad8eea2
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Publish Python distribution to PyPI

jobs:
build:
name: Build distribution
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v3
with:
name: python-package-distributions
path: dist/

publish-to-pypi:
name: Publish Python distribution to PyPI
if: startsWith(github.ref, 'refs/tags/')
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/megham/
permissions:
id-token: write
steps:
- name: Download all the dists
uses: actions/download-artifact@v3
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
megham.egg-info
__pycache__
dist

0 comments on commit ad8eea2

Please sign in to comment.