@@ -70,16 +70,22 @@ jobs:
7070 id-token : write # IMPORTANT: mandatory for trusted publishing
7171
7272 steps :
73+ - name : Download all the dists
74+ uses : actions/download-artifact@v4
75+ with :
76+ name : python-package-distributions
77+ path : dist/
78+
7379 - name : Extract tag
7480 id : tag
7581 run : |
7682 TAG=${GITHUB_REF#refs/tags/v}
7783 echo "tag=$TAG" >> $GITHUB_OUTPUT
7884
79- - name : Read VERSION_NAME from pyproject.toml
85+ - name : Read VERSION_NAME from dist/
8086 id : version
8187 run : |
82- VERSION_NAME=$(grep '^version' pyproject.toml | cut -d'=' -f2 | tr -d '[:space:] ')
88+ VERSION_NAME=$(basename dist/ably-*.tar.gz | sed -E 's/^ably-([^-]+)\.tar\.gz$/\1/ ')
8389 echo "version=$VERSION_NAME" >> $GITHUB_OUTPUT
8490
8591 - name : Compare version with tag
9197 env :
9298 VERSION : ${{ steps.version.outputs.version }}
9399 TAG : ${{ steps.tag.outputs.tag }}
94- - name : Download all the dists
95- uses : actions/download-artifact@v4
96- with :
97- name : python-package-distributions
98- path : dist/
100+
99101 - name : Publish distribution 📦 to PyPI
100102 uses : pypa/gh-action-pypi-publish@release/v1
101103
@@ -107,7 +109,7 @@ jobs:
107109
108110 environment :
109111 name : testpypi
110- url : https://test.pypi.org/p/ably-dev
112+ url : https://test.pypi.org/p/ably
111113
112114 permissions :
113115 id-token : write # IMPORTANT: mandatory for trusted publishing
0 commit comments