Skip to content

Commit 79d6646

Browse files
ci: Add a new step to update pyln versions out of WORKDIR
The Publish distribution stage was failing because it executed the update-pyln-versions script from within the WORKDIR, which created an invalid context. To resolve this, we have decoupled the process, separating the updating of version state into its own step that runs from the root directory before the publish operation. Changelog-None.
1 parent 6a05f24 commit 79d6646

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/workflows/pypi.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,13 @@ jobs:
6767
- name: Install uv
6868
uses: astral-sh/setup-uv@v5
6969

70+
- name: Update pyln versions
71+
id: update-versions
72+
run: |
73+
export VERSION=$(git describe --tags --abbrev=0)
74+
echo "Pyln VERSION: $VERSION"
75+
make update-pyln-versions NEW_VERSION=$VERSION
76+
7077
- name: Publish distribution 📦 to Test PyPI
7178
if: github.repository == 'ElementsProject/lightning' && steps.set-values.outputs.DISTLOCATION == 'test'
7279
env:
@@ -84,10 +91,6 @@ jobs:
8491
WORKDIR: ${{ matrix.WORKDIR }}
8592
run: |
8693
echo "UV VERSION PUBLISH: $(uv --version)"
87-
cd ${{ env.WORKDIR }}
88-
export VERSION=$(git describe --tags --abbrev=0)
8994
echo "Pyln VERSION: $VERSION"
90-
make update-pyln-versions NEW_VERSION=$VERSION
91-
cd /github/workspace
9295
uv build --package ${{ matrix.PACKAGE }}
9396
uv publish

0 commit comments

Comments
 (0)