From 0bd24db96b1b4cb82789bc43e82fc142b89fce8e Mon Sep 17 00:00:00 2001 From: michaelshin Date: Fri, 28 Apr 2023 12:47:40 -0400 Subject: [PATCH 1/4] Include documentation + committing release branch --- .../workflows/build-and-publish-new-version.yml | 8 ++++++++ README.md | 13 ------------- RELEASE.md | 17 +++++++++++++++++ 3 files changed, 25 insertions(+), 13 deletions(-) create mode 100644 RELEASE.md diff --git a/.github/workflows/build-and-publish-new-version.yml b/.github/workflows/build-and-publish-new-version.yml index d41a335..42269bb 100644 --- a/.github/workflows/build-and-publish-new-version.yml +++ b/.github/workflows/build-and-publish-new-version.yml @@ -32,6 +32,14 @@ jobs: - name: Update version number run: | poetry version ${{ github.event.inputs.tag }} + + - name: Commit updated version number and tag it + run: | + git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}" + git config --global user.email "username@users.noreply.github.com" + git commit -am "Release version ${{ github.event.inputs.tag }}" + git push origin release/${{ github.event.inputs.tag }} + git tag ${{ github.event.inputs.tag }} - name: Build Python artifacts run: | diff --git a/README.md b/README.md index 991c075..2408eb9 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,6 @@ DeepView.Profile is a tool to profile and debug the training performance of [PyT - [Installation](#installation) - [Usage example](#getting-started) - [Development Environment Setup](#dev-setup) -- [Release Process](#release-process) - [Release History](#release-history) - [Meta](#meta) - [Contributing](#contributing) @@ -79,18 +78,6 @@ From the project root, do ```zsh poetry install ``` -

Release Process

- -1. Make sure you're on main branch and it is clean -1. Run [tools/prepare-release.sh](tools/prepare-release.sh) which will: - * Increment the version - * Create a release branch - * Create a release PR -1. After the PR is merged [build-and-publish-new-version.yml](.github/workflows/build-and-publish-new-version.yml) GitHub action will: - * build the Python Wheels - * GitHub release - * Publish to Test PyPI - * Subject to approval publish to PyPI

Release History

diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000..a1c3ef7 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,17 @@ +# How to release a new version of DeepView.Profile +- Go to Github repo and run the action `build-and-publish-new-version`. You will be prompted to specify the version number. + +- This runs a GitHub Action that will take the following steps: + 1. Fetches the repo and its dependencies + 2. Creates a release branch + 3. Updates the version number to the user-specified version by updating the pyproject.toml + 4. Commits the changes and tag the commit with the version number + 5. Builds the Python build artifacts + 7. Publishes a release to Github + 8. Create a PR to merge back into main + 9. Publishes to Test PyPI + 10. Publishes to PyPI + +- The action `build-and-publish-new-version` is defined under `.github/workflows/build-and-publish-new-versionyaml` + +- This release process follows the release process outlined in [OneFlow](https://www.endoflineblog.com/oneflow-a-git-branching-model-and-workflow). \ No newline at end of file From ec36da41ff7b627cf15915ebe0139920d926d80f Mon Sep 17 00:00:00 2001 From: michaelshin Date: Fri, 28 Apr 2023 13:02:59 -0400 Subject: [PATCH 2/4] Add env for author --- .github/workflows/build-and-publish-new-version.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-and-publish-new-version.yml b/.github/workflows/build-and-publish-new-version.yml index 42269bb..5be5c1a 100644 --- a/.github/workflows/build-and-publish-new-version.yml +++ b/.github/workflows/build-and-publish-new-version.yml @@ -11,6 +11,8 @@ jobs: build-and-publish: name: Build DeepView.Profile runs-on: ubuntu-latest + env: + CI_COMMIT_AUTHOR: CentML steps: - name: Checkout uses: actions/checkout@v3 From c12c6f5922e720db936ae8d3dde8ee29b1417876 Mon Sep 17 00:00:00 2001 From: michaelshin Date: Fri, 28 Apr 2023 13:32:06 -0400 Subject: [PATCH 3/4] Fix indent --- .github/workflows/build-and-publish-new-version.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-publish-new-version.yml b/.github/workflows/build-and-publish-new-version.yml index 5be5c1a..ade2466 100644 --- a/.github/workflows/build-and-publish-new-version.yml +++ b/.github/workflows/build-and-publish-new-version.yml @@ -11,8 +11,8 @@ jobs: build-and-publish: name: Build DeepView.Profile runs-on: ubuntu-latest - env: - CI_COMMIT_AUTHOR: CentML + env: + CI_COMMIT_AUTHOR: CentML steps: - name: Checkout uses: actions/checkout@v3 From 60ab7fb4925e00b64bf5df4a60cc71984fe406f4 Mon Sep 17 00:00:00 2001 From: michaelshin Date: Fri, 28 Apr 2023 13:37:07 -0400 Subject: [PATCH 4/4] Set CI commit email to machine account --- .github/workflows/build-and-publish-new-version.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-publish-new-version.yml b/.github/workflows/build-and-publish-new-version.yml index ade2466..35a7025 100644 --- a/.github/workflows/build-and-publish-new-version.yml +++ b/.github/workflows/build-and-publish-new-version.yml @@ -13,6 +13,7 @@ jobs: runs-on: ubuntu-latest env: CI_COMMIT_AUTHOR: CentML + CI_COMMIT_EMAIL: centml-machine-user@users.noreply.github.com steps: - name: Checkout uses: actions/checkout@v3 @@ -38,7 +39,7 @@ jobs: - name: Commit updated version number and tag it run: | git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}" - git config --global user.email "username@users.noreply.github.com" + git config --global user.email "${{ env.CI_COMMIT_EMAIL }}" git commit -am "Release version ${{ github.event.inputs.tag }}" git push origin release/${{ github.event.inputs.tag }} git tag ${{ github.event.inputs.tag }}