13
1
Fork 0
mirror of https://github.com/netzbegruenung/passbolt-salt synced 2024-05-05 13:53:40 +02:00

Merge pull request #6 from netzbegruenung/feature/pypi-publishing

Publish releases on PyPi
This commit is contained in:
Sven Seeberg 2023-12-18 17:18:24 +01:00 committed by GitHub
commit bd64b3d998
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 82 additions and 25 deletions

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

25
pyproject.toml Normal file
View file

@ -0,0 +1,25 @@
[project]
name = "passbolt-salt"
version = "1.0.2"
authors = [
{ name="Sven Seeberg", email="sven.seeberg@netzbegruenung.de" },
{ name="Alexander Bigga", email="alexander.bigga@verdigado.com"}
]
description = "Integrate Passbolt into Saltstack to manage secrets in the infrastructure of your organization"
readme = "README.md"
requires-python = ">=3.8"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
dependencies = [
"passbolt-python-api",
]
[project.urls]
Homepage = "https://github.com/netzbegruenung/passbolt-salt"
Issues = "https://github.com/netzbegruenung/passbolt-salt/issues"
[tool.setuptools]
license-files = ["LICENSE"]

View file

@ -1,30 +1,11 @@
#!/usr/bin/env python3
"""
Setup script
Minimal setup.py for legacy builds.
See pyproject.toml for all setup configuration options.
"""
from __future__ import annotations
from setuptools import find_packages, setup
from setuptools import setup
setup(
name="salt-passbolt",
version="1.0.2",
packages=find_packages("src"),
package_dir={'': 'src'},
include_package_data=True,
install_requires=[
"passbolt-python-api>=0.1.2",
],
author="Sven Seeberg (Netzbegrünung e.V.)",
author_email="mail@sven-seeberg.de",
description="Fetch passwords from Passbolt to build Saltstack pillars",
license="MIT",
keywords="Passbolt Salt Pillar",
url="http://github.com/netzbegruenung/salt-passbolt",
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
]
)
if __name__ == "__main__":
setup()