Skip to content

Commit

Permalink
Merge pull request #5 from rpm-software-management/release-workflow
Browse files Browse the repository at this point in the history
Add release workflow to publish to PyPI
  • Loading branch information
dcermak authored Jul 23, 2024
2 parents 5c2448e + a61381d commit 6cdc5d0
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: release to PyPI

on:
push:

jobs:
pypi-publish:
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"

- name: Install dependencies & build wheel
run: |
pipx install poetry
poetry install
poetry build
- name: Check the wheel
run: |
pipx install twine
twine check dist/opensuse_distro_aliases-*whl
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: startsWith(github.ref, 'refs/tags')

0 comments on commit 6cdc5d0

Please sign in to comment.