publish only on master
This commit is contained in:
parent
5e4c1811ae
commit
8c635339af
1 changed files with 1 additions and 15 deletions
16
.github/workflows/pypi.yaml
vendored
16
.github/workflows/pypi.yaml
vendored
|
|
@ -1,17 +1,10 @@
|
||||||
name: ytld-sub PyPI
|
name: ytld-sub PyPI
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
# Publish `master` as Docker `latest` image.
|
# publish only when pushed to master
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
# Publish `v1.2.3` tags as releases.
|
|
||||||
tags:
|
|
||||||
- v*
|
|
||||||
|
|
||||||
# Run tests for any PRs.
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-publish:
|
build-and-publish:
|
||||||
name: build-and-publish
|
name: build-and-publish
|
||||||
|
|
@ -32,13 +25,6 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
make wheel
|
make wheel
|
||||||
|
|
||||||
- name: Publish distribution 📦 to Test PyPI
|
|
||||||
if: ${{ github.ref != 'refs/heads/master' }}
|
|
||||||
uses: pypa/gh-action-pypi-publish@release/v1
|
|
||||||
with:
|
|
||||||
password: ${{ secrets.PYPI_TEST_API_TOKEN }}
|
|
||||||
repository_url: https://test.pypi.org/legacy/
|
|
||||||
|
|
||||||
- name: Publish distribution 📦 to PyPI
|
- name: Publish distribution 📦 to PyPI
|
||||||
if: ${{ github.ref == 'refs/heads/master' }}
|
if: ${{ github.ref == 'refs/heads/master' }}
|
||||||
uses: pypa/gh-action-pypi-publish@release/v1
|
uses: pypa/gh-action-pypi-publish@release/v1
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue