Skip to content

Commit

Permalink
publish on pypi. 3rd try
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeoLacruz committed Feb 19, 2024
1 parent baa2c29 commit 4bea880
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
pull_request:
release:
# types: [published]
types: [published]

jobs:
style-python:
Expand All @@ -29,3 +29,32 @@ jobs:
- name: Check style
run: |
flake8 . --max-line-length=100 --ignore=E731
publish:
# if: github.event_name == 'release' && github.event.action == 'published'
needs: [style-python]
name: 📦 Publish to PyPi
runs-on: ubuntu-latest
environment:
name: release
url: https://pypi.org/p/inventree-zebra-plugin
permissions:
id-token: write

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup python
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Install build dependencies
run: pip install --upgrade wheel setuptools twine build

- name: Build pip package
run: python3 -m build

- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 4bea880

Please sign in to comment.