Skip to content

Commit

Permalink
added release and publish action
Browse files Browse the repository at this point in the history
  • Loading branch information
jankoslavic committed Oct 8, 2023
1 parent 28a0dbd commit 5e2ee47
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 25 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/release-and-publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Release and Publish to PyPI
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

publish:
runs-on: ubuntu-latest
needs: release
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11'

- name: Install dependencies
run: pip install setuptools wheel twine

- name: Build package
run: python setup.py sdist bdist_wheel

- name: Publish to PyPI
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
25 changes: 0 additions & 25 deletions .github/workflows/release-to-pypi.yml

This file was deleted.

0 comments on commit 5e2ee47

Please sign in to comment.