mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-15 11:59:16 +01:00
gci: Checkout entire history in PyPI build to ensure tags are there
setuptools_scm requires the ability to look up the latest tag.
This commit is contained in:
parent
c4af904342
commit
808f582638
1 changed files with 20 additions and 12 deletions
32
.github/workflows/pypi.yml
vendored
32
.github/workflows/pypi.yml
vendored
|
@ -3,7 +3,7 @@ name: Publish Python π distributions π¦ to PyPI and TestPyPI
|
|||
on: push
|
||||
jobs:
|
||||
deploy:
|
||||
name: Build and publish ${{ matrix.package }} π
|
||||
name: Build and publish ${{ matrix.package }} π
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
fail-fast: true
|
||||
|
@ -23,30 +23,38 @@ jobs:
|
|||
WORKDIR: contrib/pyln-spec/bolt4/
|
||||
- PACKAGE: pyn-bolt7
|
||||
WORKDIR: contrib/pyln-spec/bolt7/
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
- name: Install pypa/build
|
||||
run: >-
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
with:
|
||||
# Need to fetch entire history in order to locate the version tag
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
|
||||
- name: Install pypa/build
|
||||
run: >-
|
||||
python -m pip install build --user
|
||||
|
||||
- name: Build a binary wheel and a source tarball
|
||||
env:
|
||||
WORKDIR: ${{ matrix.WORKDIR }}
|
||||
run: >-
|
||||
cd ${{ env.WORKDIR}} &&
|
||||
python -m build --sdist --wheel --outdir dist/ .
|
||||
- name: Publish distribution π¦ to Test PyPI
|
||||
|
||||
- name: Publish distribution π¦ to Test PyPI
|
||||
uses: pypa/gh-action-pypi-publish@master
|
||||
env:
|
||||
WORKDIR: ${{ matrix.WORKDIR }}
|
||||
with:
|
||||
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
|
||||
with:
|
||||
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
|
||||
repository_url: https://test.pypi.org/legacy/
|
||||
packages_dir: "${{ env.WORKDIR}}/dist"
|
||||
skip_existing: true
|
||||
|
||||
- name: Publish distribution π¦ to PyPI
|
||||
if: startsWith(github.ref, 'refs/tags')
|
||||
uses: pypa/gh-action-pypi-publish@master
|
||||
|
|
Loadingβ¦
Add table
Reference in a new issue