13
1
Fork 0
mirror of https://github.com/netzbegruenung/passbolt-salt synced 2024-04-27 02:14:51 +02:00

Add PyPi publishing action

This commit is contained in:
Sven Seeberg 2023-12-18 17:10:32 +01:00
parent ae9b8f068e
commit 20c0aa78e0
Signed by: sven.seeberg
GPG key ID: 29559DD5A83806B5

51
.github/workflows/publish-to-pypi.yml vendored Normal file
View file

@ -0,0 +1,51 @@
name: Publish Python 🐍 distribution 📦 to PyPI
on: push
jobs:
build:
name: Build distribution 📦
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v3
with:
name: python-package-distributions
path: dist/
publish-to-pypi:
name: >-
Publish Python 🐍 distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags/')
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/passbolt-salt
permissions:
id-token: write
steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1