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
12 changes: 7 additions & 5 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,29 +61,31 @@ jobs:
WORKDIR: ${{ matrix.WORKDIR }}
run: |
export VERSION=$(git describe --abbrev=0).post$(git describe --abbrev=1 | awk -F "-" '{print $2}')
cd ${{ env.WORKDIR}}
cd ${{ env.WORKDIR }}
make upgrade-version NEW_VERSION=$VERSION
poetry build
poetry build --no-interaction

- name: Publish distribution 📦 to Test PyPI
if: github.repository == 'ElementsProject/lightning'
env:
POETRY_PYPI_TOKEN_TESTPYPI: ${{ secrets.TEST_PYPI_API_TOKEN }}
WORKDIR: ${{ matrix.WORKDIR }}
run: |
cd ${{ env.WORKDIR}}
cd ${{ env.WORKDIR }}
python3 -m pip config set global.timeout 150
poetry config repositories.testpypi https://test.pypi.org/legacy/
poetry build --no-interaction
poetry publish --repository testpypi --no-interaction --skip-existing

- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags') && github.repository == 'ElementsProject/lightning'
if: startsWith(github.ref, 'refs/tags/v') && github.repository == 'ElementsProject/lightning'
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }}
WORKDIR: ${{ matrix.WORKDIR }}
run: |
cd ${{ env.WORKDIR}}
cd ${{ env.WORKDIR }}
export VERSION=$(git describe --abbrev=0)
make upgrade-version NEW_VERSION=$VERSION
python3 -m pip config set global.timeout 150
poetry build --no-interaction
poetry publish --no-interaction
13 changes: 7 additions & 6 deletions contrib/reprobuild/Dockerfile.focal
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,12 @@ RUN cd /tmp/ && \
RUN mkdir /build
WORKDIR /build

CMD poetry export -o requirements.txt --without-hashes \
# We mount the repo into `/repo` and then we take a snapshot of it
# first by cloning it. This ensures we're not including any
# uncommitted changes in the working directory on the host. Notice
# that we no longer take the zipfile.
CMD git clone /repo . \
&& poetry export -o requirements.txt --without-hashes \
&& pip install -r requirements.txt \
&& mkdir -p /repro \
&& cd /repro \
&& unzip /build/release/*.zip \
&& cd clightning* \
&& tools/repro-build.sh \
&& cp *.xz /build/release/
&& cp *.xz /repo/release/
13 changes: 7 additions & 6 deletions contrib/reprobuild/Dockerfile.jammy
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,12 @@ RUN cd /tmp/ && \
RUN mkdir /build
WORKDIR /build

CMD poetry export -o requirements.txt --without-hashes \
# We mount the repo into `/repo` and then we take a snapshot of it
# first by cloning it. This ensures we're not including any
# uncommitted changes in the working directory on the host. Notice
# that we no longer take the zipfile.
CMD git clone /repo . \
&& poetry export -o requirements.txt --without-hashes \
&& pip install -r requirements.txt \
&& mkdir -p /repro \
&& cd /repro \
&& unzip /build/release/*.zip \
&& cd clightning* \
&& tools/repro-build.sh \
&& cp *.xz /build/release/
&& cp *.xz /repo/release/
4 changes: 2 additions & 2 deletions tools/build-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ for target in $TARGETS; do
# Capitalize the first letter of distro
D=$(echo "$d" | awk '{print toupper(substr($0,1,1))substr($0,2)}')
echo "Building Ubuntu $D Image"
docker run --rm -v "$(pwd)":/build -e FORCE_MTIME="$MTIME" -e FORCE_VERSION="$VERSION" -ti cl-repro-"$d"
docker run --rm -v "$(pwd)":/repo -e FORCE_MTIME="$MTIME" -e FORCE_VERSION="$VERSION" -ti cl-repro-"$d"
echo "Ubuntu $D Image Built"
done
;;
Expand Down Expand Up @@ -257,7 +257,7 @@ if [ "$VERIFY_RELEASE" = "true" ]; then
fi
sumfile="$(pwd)/${sumfile}"
cd release/
# Check that the release captains sum matches. Ignore missing entries as we
# Check that the release captains sum matches. Ignore missing entries as we
# do not have a repro build for Fedora. Strictly this is not necessary here
# as we compare our checksums with the release captains checksums later, but
# it gives a direct hint which specific checksums don't match if so.
Expand Down