mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-21 16:14:23 +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:
8
.github/workflows/pypi.yml
vendored
8
.github/workflows/pypi.yml
vendored
@@ -25,19 +25,26 @@ jobs:
|
|||||||
WORKDIR: contrib/pyln-spec/bolt7/
|
WORKDIR: contrib/pyln-spec/bolt7/
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@master
|
- 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
|
- name: Set up Python 3.7
|
||||||
uses: actions/setup-python@v1
|
uses: actions/setup-python@v1
|
||||||
with:
|
with:
|
||||||
python-version: 3.7
|
python-version: 3.7
|
||||||
|
|
||||||
- name: Install pypa/build
|
- name: Install pypa/build
|
||||||
run: >-
|
run: >-
|
||||||
python -m pip install build --user
|
python -m pip install build --user
|
||||||
|
|
||||||
- name: Build a binary wheel and a source tarball
|
- name: Build a binary wheel and a source tarball
|
||||||
env:
|
env:
|
||||||
WORKDIR: ${{ matrix.WORKDIR }}
|
WORKDIR: ${{ matrix.WORKDIR }}
|
||||||
run: >-
|
run: >-
|
||||||
cd ${{ env.WORKDIR}} &&
|
cd ${{ env.WORKDIR}} &&
|
||||||
python -m build --sdist --wheel --outdir dist/ .
|
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
|
uses: pypa/gh-action-pypi-publish@master
|
||||||
env:
|
env:
|
||||||
@@ -47,6 +54,7 @@ jobs:
|
|||||||
repository_url: https://test.pypi.org/legacy/
|
repository_url: https://test.pypi.org/legacy/
|
||||||
packages_dir: "${{ env.WORKDIR}}/dist"
|
packages_dir: "${{ env.WORKDIR}}/dist"
|
||||||
skip_existing: true
|
skip_existing: true
|
||||||
|
|
||||||
- name: Publish distribution 📦 to PyPI
|
- name: Publish distribution 📦 to PyPI
|
||||||
if: startsWith(github.ref, 'refs/tags')
|
if: startsWith(github.ref, 'refs/tags')
|
||||||
uses: pypa/gh-action-pypi-publish@master
|
uses: pypa/gh-action-pypi-publish@master
|
||||||
|
|||||||
Reference in New Issue
Block a user