Skip to content

Commit

Permalink
Added Github action for release to PyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
amotzkau committed Apr 16, 2024
1 parent fc81f08 commit 7d26fc5
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Release
on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4

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

- name: Install dependencies
run: |
pip install setuptools wheel build
- name: Build
run: |
python -m build
- name: Upload package
uses: actions/upload-artifact@v3
with:
path: ./dist

publish:
needs: ['build']
environment: 'release'
name: Publish on PyPI
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Get package
uses: actions/download-artifact@v3

- name: Publish package on PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages_dir: artifact/

0 comments on commit 7d26fc5

Please sign in to comment.