Skip to content

Commit

Permalink
Add Github Actions release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
matyasrichter committed Sep 14, 2024
1 parent 9c6e166 commit 8e4a96f
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
on:
release:
types: [published]

jobs:
release-build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.x"

- name: Install requirements
run: |
pip install poetry
poetry install
poetry self add poetry-version-plugin
- name: Build
run: poetry build

- name: Upload build output
uses: actions/upload-artifact@v4
with:
name: release-dists
path: dist/

pypi-publish:
environment: pypi
runs-on: ubuntu-latest
needs:
- release-build
permissions:
id-token: write
packages: write
contents: write

steps:
- name: Retrieve release distributions
uses: actions/download-artifact@v4
with:
name: release-dists
path: dist/

- name: Publish release distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 8e4a96f

Please sign in to comment.