[RELEASE] Combine GH release and PyPI workflow (#459)
This commit is contained in:
parent
6794705947
commit
5035825c91
2 changed files with 27 additions and 34 deletions
32
.github/workflows/pypi.yaml
vendored
32
.github/workflows/pypi.yaml
vendored
|
|
@ -1,32 +0,0 @@
|
|||
name: ytld-sub PyPI
|
||||
on:
|
||||
push:
|
||||
# publish only when pushed to master
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build-and-publish:
|
||||
name: build-and-publish
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [ "3.10" ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Build Wheel
|
||||
run: |
|
||||
make wheel
|
||||
|
||||
- name: Publish distribution 📦 to PyPI
|
||||
if: ${{ github.ref == 'refs/heads/master' }}
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
password: ${{ secrets.PYPI_API_TOKEN }}
|
||||
29
.github/workflows/release.yaml
vendored
29
.github/workflows/release.yaml
vendored
|
|
@ -6,8 +6,33 @@ on:
|
|||
- master
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: release
|
||||
pypi-publish:
|
||||
name: pypi-publish
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [ "3.10" ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Build Wheel
|
||||
run: |
|
||||
make wheel
|
||||
|
||||
- name: Publish distribution 📦 to PyPI
|
||||
if: ${{ github.ref == 'refs/heads/master' }}
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
with:
|
||||
password: ${{ secrets.PYPI_API_TOKEN }}
|
||||
|
||||
github-release:
|
||||
name: github-release
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
|
|
|||
Loading…
Reference in a new issue