mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 06:41:44 +01:00
gci: Limit PyPI publication to pull request merged and version tags
This commit is contained in:
parent
478c43cd9c
commit
0e987e5ef5
1 changed files with 7 additions and 2 deletions
9
.github/workflows/pypi.yml
vendored
9
.github/workflows/pypi.yml
vendored
|
@ -1,6 +1,10 @@
|
|||
---
|
||||
name: Publish Python π distributions π¦ to PyPI and TestPyPI
|
||||
on: push
|
||||
on:
|
||||
# Only deploy if we're the result of a PR being merged
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
jobs:
|
||||
deploy:
|
||||
name: Build and publish ${{ matrix.package }} π
|
||||
|
@ -46,6 +50,7 @@ jobs:
|
|||
python -m build --sdist --wheel --outdir dist/ .
|
||||
|
||||
- name: Publish distribution π¦ to Test PyPI
|
||||
if: github.repository == βElementsProject/lightningβ
|
||||
uses: pypa/gh-action-pypi-publish@master
|
||||
env:
|
||||
WORKDIR: ${{ matrix.WORKDIR }}
|
||||
|
@ -56,7 +61,7 @@ jobs:
|
|||
skip_existing: true
|
||||
|
||||
- name: Publish distribution π¦ to PyPI
|
||||
if: startsWith(github.ref, 'refs/tags')
|
||||
if: startsWith(github.ref, 'refs/tags') && github.repository == βElementsProject/lightningβ
|
||||
uses: pypa/gh-action-pypi-publish@master
|
||||
env:
|
||||
WORKDIR: ${{ matrix.WORKDIR }}
|
||||
|
|
Loadingβ¦
Add table
Reference in a new issue