release.yml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. name: Build and publish DeepSpeed release
  2. on:
  3. push:
  4. tags:
  5. - 'v*.*.*'
  6. jobs:
  7. deploy:
  8. runs-on: ubuntu-20.04
  9. environment: release-env
  10. steps:
  11. - uses: actions/checkout@v3
  12. with:
  13. ref: "master"
  14. - id: setup-venv
  15. uses: ./.github/workflows/setup-venv
  16. - name: Get release version from tag
  17. run: |
  18. echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
  19. - name: Check release version
  20. run: |
  21. pip install packaging
  22. python release/check_release_version.py --release_version ${{ env.RELEASE_VERSION }}
  23. - name: Build DeepSpeed
  24. run: |
  25. DS_BUILD_STRING=" " python setup.py sdist
  26. - name: Publish to PyPI
  27. uses: pypa/gh-action-pypi-publish@release/v1
  28. with:
  29. password: ${{ secrets.PYPI_API_TOKEN }}
  30. repository-url: https://upload.pypi.org/legacy/
  31. - name: Bump version
  32. run: |
  33. python release/bump_patch_version.py --current_version ${{ env.RELEASE_VERSION }}
  34. - name: Create Pull Request
  35. uses: peter-evans/create-pull-request@v4
  36. with:
  37. token: ${{ secrets.GH_PAT }}
  38. add-paths: |
  39. version.txt
  40. body: |
  41. **Auto-generated PR to update version.txt after a DeepSpeed release**
  42. Released version - ${{ env.RELEASE_VERSION }}
  43. Author - @${{ github.actor }}
  44. branch: AutoPR/${{ env.RELEASE_VERSION }}
  45. assignees: ${{ github.actor }}
  46. title: "Update version.txt after ${{ env.RELEASE_VERSION }} release"
  47. author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>