Skip to content

Commit 2118c63

Browse files
authored
Add release flow (#4467)
1 parent f9698c7 commit 2118c63

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/release.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Build and publish DeepSpeed release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-20.04
11+
environment: release-env
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
with:
16+
ref: "master"
17+
- name: Get release version from tag
18+
run: |
19+
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
20+
- name: Check release version
21+
run: |
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_wheel
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>

0 commit comments

Comments
 (0)