mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-15 20:09:18 +01:00
gci: Add build step to PyPI publication
This commit is contained in:
parent
44b7fe7cc6
commit
d8f410f2e5
1 changed files with 7 additions and 5 deletions
12
.github/workflows/pypi.yml
vendored
12
.github/workflows/pypi.yml
vendored
|
@ -61,9 +61,9 @@ 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"
|
||||
|
@ -71,19 +71,21 @@ jobs:
|
|||
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
|
||||
|
|
Loading…
Add table
Reference in a new issue