From aa3f9171e819748dab8a3807c42aa574b1afa42a Mon Sep 17 00:00:00 2001 From: Jacob Rief Date: Mon, 13 Nov 2023 23:28:05 +0100 Subject: [PATCH] .github/workflows/publish.yml --- .github/workflows/publish.yml | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..93f3f26 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,40 @@ +name: Publish djangocms-cascade + +on: + push: + tags: + - '*' + +jobs: + publish: + name: "Publish release" + runs-on: "ubuntu-latest" + + environment: + name: deploy + + strategy: + matrix: + python-version: ["3.9"] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install twine + python -m pip install build + - name: Build 🐍 Python 📦 Package + run: | + python -m build --sdist --wheel --outdir dist/ + twine check --strict dist/* + - name: Publish 🐍 Python 📦 Package to PyPI + if: startsWith(github.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN_DJANGO_ANGULAR }}