Skip to content

Commit 1bfa7d4

Browse files
committed
fixing SBOM
1 parent 1d9c4e9 commit 1bfa7d4

3 files changed

Lines changed: 18 additions & 27 deletions

File tree

.github/workflows/publish-python-sdk.yml

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -124,33 +124,17 @@ jobs:
124124
uv tool run pip-audit --format json --output vulnerability-report.json --requirement requirements.txt || true
125125
echo "Generated vulnerability report (non-blocking)"
126126
127-
- run: uv build
127+
- run: uv build --no-source
128+
129+
- name: Sign the package
130+
run: |
131+
uv pip install -U pypi-attestations
132+
uv run pypi_attestations sign dist/*
128133
129134
- name: Publish to PyPI with provenance
130135
run: |
131-
# Get the current version
132-
VERSION=$(uv run python -c "
133-
import sys
134-
sys.path.append('.')
135-
from exospherehost._version import version
136-
print(version)
137-
")
138-
139-
echo "Checking if exospherehost version $VERSION already exists on PyPI..."
140-
141-
# Query PyPI JSON API to check if version exists
142-
HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" "https://pypi.org/pypi/exospherehost/$VERSION/json")
143-
144-
if [ "$HTTP_STATUS" = "200" ]; then
145-
echo "Version $VERSION already exists on PyPI. Skipping publish."
146-
exit 0
147-
elif [ "$HTTP_STATUS" = "404" ]; then
148-
echo "Version $VERSION not found on PyPI. Proceeding with publish."
149-
uv publish
150-
else
151-
echo "Unexpected HTTP status $HTTP_STATUS when checking PyPI. Proceeding with publish."
152-
uv publish
153-
fi
136+
uv pip install -U twine
137+
uv run twine upload --attestations dist/*
154138
155139
- name: Upload SBOM artifacts
156140
uses: actions/upload-artifact@v4

.github/workflows/release-python-sdk.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,17 @@ jobs:
178178
echo 'python -m sigstore verify --bundle <bundle-file> exospherehost==${{ github.ref_name }}' >> sbom-summary.md
179179
echo '```' >> sbom-summary.md
180180
181-
- run: uv build
181+
- run: uv build --no-source
182+
183+
- name: Sign the package
184+
run: |
185+
uv pip install -U pypi-attestations
186+
uv run pypi_attestations sign dist/*
182187
183188
- name: Publish to PyPI with provenance
184-
run: uv publish
189+
run: |
190+
uv pip install -U twine
191+
uv run twine upload --attestations dist/*
185192
186193
- name: Upload SBOM artifacts
187194
uses: actions/upload-artifact@v4
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version = "0.0.2b7"
1+
version = "0.0.2b8"

0 commit comments

Comments
 (0)