Skip to content

Commit

Permalink
* feat(build.yml): add GitHub Actions workflow for Python package bui…
Browse files Browse the repository at this point in the history
…ld and publish

* fix(setup.py): bump version from 0.3.1 to 0.4.0
  • Loading branch information
AntreasAntoniou committed Nov 16, 2023
1 parent 801ee4b commit f873c62
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
36 changes: 36 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Python Package Build and Publish

on:
push:
branches:
- main # Only run workflow for pushes to main branch
release:
types: [created] # Run workflow when a new release is created

jobs:
build-and-publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2 # Checkout the repository content to GitHub Actions runner

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x' # Specify the Python version

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install setuptools wheel twine
- name: Build source and wheel distribution
run: |
python setup.py sdist bdist_wheel
- name: Publish the distribution to PyPI
if: github.event_name == 'release' && github.event.action == 'created'
run: twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

setup(
name="kubejobs",
version="0.3.1",
version="0.4.0",
description="A Python library for creating and running Kubernetes Jobs",
long_description=long_description,
long_description_content_type="text/markdown", # This is important!
Expand Down

0 comments on commit f873c62

Please sign in to comment.