publish only on master

This commit is contained in:
Jesse Bannon 2023-02-20 16:31:33 -08:00
parent 5e4c1811ae
commit 8c635339af

View file

@ -1,17 +1,10 @@
name: ytld-sub PyPI
on:
push:
# Publish `master` as Docker `latest` image.
# publish only when pushed to master
branches:
- master
# Publish `v1.2.3` tags as releases.
tags:
- v*
# Run tests for any PRs.
pull_request:
jobs:
build-and-publish:
name: build-and-publish
@ -32,13 +25,6 @@ jobs:
run: |
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
if: ${{ github.ref == 'refs/heads/master' }}
uses: pypa/gh-action-pypi-publish@release/v1