Skip to content

Commit 288ea49

Browse files
committed
Add CI job to release compliance-tool to PyPI (#382)
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.
1 parent 079e128 commit 288ea49

File tree

1 file changed

+29
-2
lines changed

1 file changed

+29
-2
lines changed

.github/workflows/release.yml

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ on:
55
types: [published]
66

77
jobs:
8-
publish:
9-
# This job publishes the package to PyPI
8+
sdk-publish:
9+
# This job publishes the SDK package to PyPI
1010
runs-on: ubuntu-latest
1111
defaults:
1212
run:
@@ -31,3 +31,30 @@ jobs:
3131
uses: pypa/gh-action-pypi-publish@release/v1
3232
with:
3333
password: ${{ secrets.PYPI_ORG_TOKEN }}
34+
35+
compliance-tool-publish:
36+
# This job publishes the compliance_tool package to PyPI
37+
runs-on: ubuntu-latest
38+
defaults:
39+
run:
40+
working-directory: ./compliance_tool
41+
steps:
42+
- uses: actions/checkout@v4
43+
- name: Set up Python 3.10
44+
uses: actions/setup-python@v5
45+
with:
46+
python-version: "3.10"
47+
- name: Install dependencies
48+
run: |
49+
python -m pip install --upgrade pip
50+
pip install build
51+
- name: Create source and wheel dist
52+
# (2024-12-11, s-heppner)
53+
# The PyPI Action expects the dist files in a toplevel `/dist` directory,
54+
# so we have to specify this as output directory here.
55+
run: |
56+
python -m build --outdir ../dist
57+
- name: Publish distribution to PyPI
58+
uses: pypa/gh-action-pypi-publish@release/v1
59+
with:
60+
password: ${{ secrets.PYPI_ORG_TOKEN }}

0 commit comments

Comments
 (0)