Skip to content

Commit

Permalink
gci: Add build step to PyPI publication
Browse files Browse the repository at this point in the history
  • Loading branch information
cdecker authored and vincenzopalazzo committed Dec 28, 2023
1 parent 44b7fe7 commit d8f410f
Showing 1 changed file with 7 additions and 5 deletions.
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' && github.ref == "refs/heads/master"
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

0 comments on commit d8f410f

Please sign in to comment.