From b75eb7849d9decdbe7b29fbc534da402d02598e3 Mon Sep 17 00:00:00 2001 From: s-heppner Date: Wed, 23 Apr 2025 13:15:26 +0200 Subject: [PATCH] Add CI job to release compliance-tool to PyPI This adds a job `compliance-tool-publish` to the `release.yml` that automatically publishes the compliance-tool package to PyPI upon release. It is simply copied from the SDK job, with adapted paths. --- .github/workflows/release.yml | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 991e8ad7b..06491c0cb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,8 +5,8 @@ on: types: [published] jobs: - publish: - # This job publishes the package to PyPI + sdk-publish: + # This job publishes the SDK package to PyPI runs-on: ubuntu-latest defaults: run: @@ -31,3 +31,30 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 with: password: ${{ secrets.PYPI_ORG_TOKEN }} + + compliance-tool-publish: + # This job publishes the compliance_tool package to PyPI + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./compliance_tool + steps: + - uses: actions/checkout@v4 + - name: Set up Python 3.10 + uses: actions/setup-python@v5 + with: + python-version: "3.10" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build + - name: Create source and wheel dist + # (2024-12-11, s-heppner) + # The PyPI Action expects the dist files in a toplevel `/dist` directory, + # so we have to specify this as output directory here. + run: | + python -m build --outdir ../dist + - name: Publish distribution to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_ORG_TOKEN }}