Skip to content

Commit 570c631

Browse files
king-11madelinevibes
authored andcommitted
feat: update release pipeline
add documentation for release pipeline changes
1 parent 89eaf5b commit 570c631

File tree

2 files changed

+13
-21
lines changed

2 files changed

+13
-21
lines changed

.github/workflows/pypi.yml

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -64,38 +64,30 @@ jobs:
6464
with:
6565
python-version: '3.10'
6666

67-
- name: Install Poetry
68-
run: |
69-
curl -sSL https://install.python-poetry.org | python3 -
70-
echo "$HOME/.local/bin" >> $GITHUB_PATH
71-
echo "PATH=$HOME/.local/bin:$PATH"
67+
- name: Install uv
68+
uses: astral-sh/setup-uv@v5
7269

7370
- name: Publish distribution 📦 to Test PyPI
7471
if: github.repository == 'ElementsProject/lightning' && steps.set-values.outputs.DISTLOCATION == 'test'
7572
env:
76-
POETRY_PYPI_TOKEN_TESTPYPI: ${{ secrets.TEST_PYPI_API_TOKEN }}
73+
UV_PUBLISH_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}
7774
WORKDIR: ${{ matrix.WORKDIR }}
7875
run: |
79-
echo "POETRY VERSION TEST: $(poetry --version)"
8076
echo "Pyln VERSION: $VERSION"
81-
cd ${{ env.WORKDIR }}
82-
python3 -m pip config set global.timeout 150
83-
poetry config repositories.testpypi https://test.pypi.org/legacy/
84-
make upgrade-version NEW_VERSION=$VERSION
85-
poetry build --no-interaction
86-
poetry publish --repository testpypi --no-interaction --skip-existing
77+
uv build --package ${{ matrix.PACKAGE }}
78+
uv publish --package ${{ matrix.PACKAGE }} --publish-url https://test.pypi.org/legacy/ --skip-existing
8779
8880
- name: Publish distribution 📦 to PyPI
8981
if: github.repository == 'ElementsProject/lightning' && steps.set-values.outputs.DISTLOCATION == 'prod'
9082
env:
91-
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }}
83+
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
9284
WORKDIR: ${{ matrix.WORKDIR }}
9385
run: |
94-
echo "POETRY VERSION PUBLISH: $(poetry --version)"
86+
echo "UV VERSION PUBLISH: $(uv --version)"
9587
cd ${{ env.WORKDIR }}
9688
export VERSION=$(git describe --tags --abbrev=0)
9789
echo "Pyln VERSION: $VERSION"
9890
make upgrade-version NEW_VERSION=$VERSION
99-
python3 -m pip config set global.timeout 150
100-
poetry build --no-interaction
101-
poetry publish --no-interaction
91+
cd /github/workspace
92+
uv build --package ${{ matrix.PACKAGE }}
93+
uv publish --package ${{ matrix.PACKAGE }}

doc/contribute-to-core-lightning/release-checklist.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ Here's a checklist for the release process.
8282
4. Send your signatures from `release/SHA256SUMS.new` to release captain.
8383
5. Or follow [link](https://docs.corelightning.org/docs/repro#verifying-a-reproducible-build) for manual verification instructions.
8484
10. Append signatures shared by the team into the `SHA256SUMS.asc` file, verify with `gpg --verify SHA256SUMS.asc` and include the file in the draft release.
85-
11. The GitHub action `Publish Python 🐍 distributions 📦 to PyPI and TestPyPI` should upload the pyln modules to pypi.org. However, this can also be done manually by running `make pyln-release`. This process requires keys for each of the `pyln-client`, `pyln-proto`, and `pyln-testing` modules to be accessible to Poetry. You can configure the Python keyring library with a suitable backend to handle this, or alternatively, set the key as an environment variable and build and publish each pyln release independently:
86-
- `export POETRY_PYPI_TOKEN_PYPI=<pyln-client token>`
85+
11. The GitHub action `Publish Python 🐍 distributions 📦 to PyPI and TestPyPI` should upload the pyln modules to pypi.org. However, this can also be done manually by running `make pyln-release`. This process requires keys for each of the `pyln-client`, `pyln-proto`, and `pyln-testing` modules to be accessible to uv. You can set the key as an environment variable and build and publish each pyln release independently:
86+
- `export UV_PUBLISH_TOKEN=<pyln-client token>`
8787
- `make pyln-release-client`
88-
- ... repeat for each pyln package.
88+
- ... repeat for each pyln package with the appropriate token.
8989
12. Publish multi-arch Docker images (`elementsproject/lightningd:v${VERSION}` and `elementsproject/lightningd:latest`) to Docker Hub either using the GitHub action `Build and push multi-platform docker images` or by running the `tools/build-release.sh docker` script. Prior to building docker images by `tools/build-release.sh` script, ensure that `multiarch/qemu-user-static` setup is working on your system as described [here](https://docs.corelightning.org/docs/docker-images#setting-up-multiarchqemu-user-static).
9090

9191

0 commit comments

Comments
 (0)