From 35b3e704167648295e09d0039819509d58c6e825 Mon Sep 17 00:00:00 2001 From: Fabian Braun Date: Tue, 30 May 2023 10:47:08 +0200 Subject: [PATCH] feat: Add pypi actions, bump version (#180) * Add pypi actions, bump version * Update actions * Update publish-to-test-pypi.yml --- .github/workflows/publish-to-live-pypi.yml | 41 +++++++++++++++++++++ .github/workflows/publish-to-test-pypi.yml | 43 ++++++++++++++++++++++ djangocms_alias/__init__.py | 2 +- 3 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/publish-to-live-pypi.yml create mode 100644 .github/workflows/publish-to-test-pypi.yml diff --git a/.github/workflows/publish-to-live-pypi.yml b/.github/workflows/publish-to-live-pypi.yml new file mode 100644 index 00000000..daac48bd --- /dev/null +++ b/.github/workflows/publish-to-live-pypi.yml @@ -0,0 +1,41 @@ +name: Publish Python 🐍 distributions 📦 to pypi + +on: + release: + types: + - published + +jobs: + build-n-publish: + name: Build and publish Python 🐍 distributions 📦 to pypi + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/djangocms-alias + permissions: + id-token: write + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.10 + uses: actions/setup-python@v4 + with: + python-version: '3.10' + + - 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: Publish distribution 📦 to PyPI + if: startsWith(github.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.github/workflows/publish-to-test-pypi.yml b/.github/workflows/publish-to-test-pypi.yml new file mode 100644 index 00000000..820bfe9e --- /dev/null +++ b/.github/workflows/publish-to-test-pypi.yml @@ -0,0 +1,43 @@ +name: Publish Python 🐍 distributions 📦 to TestPyPI + +on: + push: + branches: + - master + +jobs: + build-n-publish: + name: Build and publish Python 🐍 distributions 📦 to TestPyPI + runs-on: ubuntu-latest + environment: + name: pypi + url: https://test.pypi.org/p/djangocms-alias + permissions: + id-token: write + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.10 + uses: actions/setup-python@v4 + with: + python-version: '3.10' + + - 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: Publish distribution 📦 to Test PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/ + skip_existing: true diff --git a/djangocms_alias/__init__.py b/djangocms_alias/__init__.py index da77e85c..6ba7000c 100644 --- a/djangocms_alias/__init__.py +++ b/djangocms_alias/__init__.py @@ -1 +1 @@ -__version__ = '1.11.0' +__version__ = '2.0.0rc1'