From 81efedd62e1e9995c864ea74de16aeabb925b51b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20B=C3=B6hmwalder?= Date: Tue, 16 Nov 2021 12:16:50 +0100 Subject: [PATCH] Relase v0.2.0-rc.1 And add some magic to automatically create releases --- .github/workflows/publish-to-pypi.yml | 36 +++++++++++++++++++++++++++ .gitignore | 4 +++ setup.py | 2 +- 3 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/publish-to-pypi.yml create mode 100644 .gitignore diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml new file mode 100644 index 0000000..169eff1 --- /dev/null +++ b/.github/workflows/publish-to-pypi.yml @@ -0,0 +1,36 @@ +name: Build package and publish to PyPi + +on: + push: + tags: + - 'v*' + +jobs: + build-and-publish: + name: Build and publish python distribution + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Install pypa/build + run: python -m pip install build --user + - name: Build a binary wheel and a source tarball + run: python -m build --sdist --wheel --outdir dist/ . + - name: Create Release + if: startsWith(github.ref, 'refs/tags/v') + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false + - name: Publish distribution to PyPI + if: startsWith(github.ref, 'refs/tags/v') + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..517eb1a --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +build/ +dist/ +*.egg-info/ +.idea/ \ No newline at end of file diff --git a/setup.py b/setup.py index 2f19bfa..b11362a 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ setuptools.setup( name="dnfjson", - version="0.1.0", + version="0.2.0-rc.1", author="Christoph Böhmwalder", author_email="christoph.boehmwalder@linbit.com", description="A libdnf wrapper which produces machine readable output",