From 5035825c917cbcac38ec5235c0feb19cfe138dc2 Mon Sep 17 00:00:00 2001 From: Jesse Bannon Date: Mon, 20 Feb 2023 17:53:45 -0800 Subject: [PATCH] [RELEASE] Combine GH release and PyPI workflow (#459) --- .github/workflows/pypi.yaml | 32 -------------------------------- .github/workflows/release.yaml | 29 +++++++++++++++++++++++++++-- 2 files changed, 27 insertions(+), 34 deletions(-) delete mode 100644 .github/workflows/pypi.yaml diff --git a/.github/workflows/pypi.yaml b/.github/workflows/pypi.yaml deleted file mode 100644 index 84b642f5..00000000 --- a/.github/workflows/pypi.yaml +++ /dev/null @@ -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 }} \ No newline at end of file diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 18227190..7c3a06ea 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -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: