Skip to content

Commit

Permalink
Update release yaml to not write anything to GitHub (#487)
Browse files Browse the repository at this point in the history
  • Loading branch information
karan6181 authored Oct 27, 2023
1 parent 93bf054 commit 4fb0ad0
Showing 1 changed file with 6 additions and 33 deletions.
39 changes: 6 additions & 33 deletions .github/workflows/pypi-release.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish mosaicml-streaming to PyPI / GitHub
name: Publish mosaicml-streaming to PyPI

on:
push:
Expand All @@ -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
Expand All @@ -34,42 +34,15 @@ 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:
# user: __token__
# 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 }}

0 comments on commit 4fb0ad0

Please sign in to comment.