Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 37 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Upload source to Github
uses: actions/upload-artifact@v4
with:
name: source
name: dist-source
path: ./dist/amazon_ion-*.tar.gz

- uses: aws-actions/configure-aws-credentials@v4
Expand Down Expand Up @@ -114,19 +114,19 @@ jobs:
- name: Upload wheels to Github
uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}
name: dist-${{ matrix.os }}
path: ./wheelhouse/*.whl

upload-wheels:
name: Release wheels to PyPI
upload-distributions:
name: Release distributions to PyPI
runs-on: [ubuntu-latest]
needs: [build-wheels]
needs: [build-wheels, source-distribution]
permissions:
id-token: write # Needed for PyPi trusted publishing
steps:
- uses: actions/download-artifact@v4
with:
pattern: wheels-*
pattern: dist-*
path: ./dist
merge-multiple: true

Expand Down Expand Up @@ -156,3 +156,34 @@ jobs:
echo "Exiting because unable to install the new version from PYPI"
exit 1
fi

- name: Install the released sdist from PYPI
# Non-blocking for now: a from-source build failure reports but does not
# fail the release. Remove this once the sdist build is proven reliable.
continue-on-error: true
run: |
# Use a clean venv and --no-binary :all: so pip ignores the published
# wheels and builds the C extension from the source distribution. This
# verifies the sdist on PyPI is actually buildable from source.
python -m venv /tmp/sdist-venv
. /tmp/sdist-venv/bin/activate

v=""

for (( i=0; i<3; i++ ))
do
if ! (pip install --no-binary :all: --no-cache-dir "amazon.ion==${GITHUB_REF##*/v}") then
echo "Unable to build/install the desired version from sdist"
sleep 120s
continue
fi

v=$( pip show amazon.ion | grep Version | head -1 )
break
done

if [[ $v != "Version: ${GITHUB_REF##*/v}" ]]
then
echo "Exiting because unable to install the new version from sdist on PYPI"
exit 1
fi
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### (unpublished)
* Publish sdist to PyPI

### 0.14.5 (2026-06-25)
* Minimize amount of dependencies (#443)

Expand Down
Loading