Skip to content

Commit

Permalink
Add GitHub actions for publishing to PyPi
Browse files Browse the repository at this point in the history
  • Loading branch information
zeroSteiner committed Feb 17, 2024
1 parent bbf5551 commit e3a050d
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,47 @@
name: Continuous Integration

on:
push:
pull_request:

jobs:
publish-release:
name: Publish the release
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest

steps:
- name: Checkout the repository
uses: actions/checkout@v2
with:
persist-credentials: false

- name: Install build essentials
run: sudo apt-get --yes install build-essential

- name: Set up Python
uses: actions/setup-python@v2

- name: Install dependencies
run: |
pip install pipenv
pipenv install --dev
- name: Create the distribution
run: pipenv run python setup.py build sdist

- name: Publish the distribution
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}

- name: Create the release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}

1 change: 1 addition & 0 deletions .gitignore
@@ -1,5 +1,6 @@
*.py[cod]
__*.txt
.github/workflows/*.jnj
.idea/*
build/*
dist/*
Expand Down

0 comments on commit e3a050d

Please sign in to comment.