From 8e514aab899d1c22992c281f095627f2bd75a1d5 Mon Sep 17 00:00:00 2001 From: Karan Jariwala Date: Fri, 27 Oct 2023 08:21:27 -0700 Subject: [PATCH] Update release yaml to not write anything to GitHub --- .github/workflows/pypi-release.yaml | 39 +++++------------------------ 1 file changed, 6 insertions(+), 33 deletions(-) diff --git a/.github/workflows/pypi-release.yaml b/.github/workflows/pypi-release.yaml index 1099b2e49..73ea9a5fe 100644 --- a/.github/workflows/pypi-release.yaml +++ b/.github/workflows/pypi-release.yaml @@ -1,4 +1,4 @@ -name: Publish mosaicml-streaming to PyPI / GitHub +name: Publish mosaicml-streaming to PyPI on: push: @@ -17,7 +17,7 @@ jobs: - pre-commit - test - name: Build/publish to PyPI and create GitHub release + name: Build and Publish mosaicml-streaming PyPI Package runs-on: ubuntu-latest steps: - name: Checkout source @@ -34,12 +34,6 @@ jobs: python -m build twine check --strict dist/* - - name: Publish distribution 📦 to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} - # - name: Publish distribution 📦 to Test PyPI # uses: pypa/gh-action-pypi-publish@release/v1 # with: @@ -47,29 +41,8 @@ jobs: # password: ${{ secrets.TEST_PYPI_API_TOKEN }} # repository_url: https://test.pypi.org/legacy/ - - name: Create GitHub Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token - with: - tag_name: ${{ github.ref }} - release_name: ${{ github.ref }} - draft: false - prerelease: false - - - name: Get Asset name - run: | - export PKG=$(ls dist/ | grep tar) - set -- $PKG - echo "name=$1" >> $GITHUB_ENV - - name: Upload Release Asset (sdist) to GitHub - id: upload-release-asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Publish distribution 📦 to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: dist/${{ env.name }} - asset_name: ${{ env.name }} - asset_content_type: application/zip + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }}