diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a6ef32b4..cd6cfbc5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,3 +26,32 @@ jobs: - name: Run unit tests run: python -m pytest tests/ + + publish: + runs-on: ubuntu-20.04 + needs: test + + if: github.event_name == 'release' + + environment: + name: pypi + url: https://pypi.org/p/PyXB-X + + permissions: + id-token: write + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3.12 + + - name: Build package + run: python3 -m pip install --upgrade build && python3 -m build + + - name: Publish package + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file diff --git a/setup.py b/setup.py index 1b9f5836..ae310c50 100755 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ # last release of PyXB (1.2.6), so the PyXB version will remain # the same. The release number will remain based on 1.2.6, # but the rightmost number will be incremented with each patch. -version = "1.2.6.1" +version = "1.2.6.2" # Require Python 2.6 or higher or Python 3.5 or higher if (sys.version_info[:2] < (2, 6)) or (