Skip to content

Commit

Permalink
Improved release procedure by elimitating test workflow update
Browse files Browse the repository at this point in the history
Signed-off-by: Andreas Maier <andreas.r.maier@gmx.de>
  • Loading branch information
andy-maier committed Mar 29, 2024
1 parent 45876ae commit babacbd
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 29 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ on:
- # cron (in UTC): minute hour day_of_month month day_of_week
cron: '00 00 * * SUN'
push:
branches: [ master, stable_1.2 ]
branches: [ master, stable_* ]
pull_request:
branches: [ master, stable_1.2 ]
branches: [ master, stable_* ]

env:
# WBEM server image on Docker Hub as repository:tag.
Expand Down
37 changes: 10 additions & 27 deletions DEVELOP.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,24 +100,7 @@ local clone of the `pywbem/pywbemtools` Git repo.
add text for any known issues you want users to know about.
* Remove all empty list items.

5. When releasing based on the master branch, edit the GitHub workflow file
``test.yml``:

vi .github/workflows/test.yml

and in the ``on`` section, increase the version of the ``stable_*`` branch
to the new stable branch ``stable_M.N`` created earlier:


on:
schedule:
. . .
push:
branches: [ master, stable_M.N ]
pull_request:
branches: [ master, stable_M.N ]

6. Run the Safety tool:
5. Run the Safety tool:

.. code-block:: sh

Expand All @@ -130,25 +113,25 @@ local clone of the `pywbem/pywbemtools` Git repo.
If the safety run fails, you need to fix the safety issues that are
reported.

7. Commit your changes and push the topic branch to the remote repo:
6. Commit your changes and push the topic branch to the remote repo:

git commit -asm "Release ${MNU}"
git push --set-upstream origin release_${MNU}

8. On GitHub, create a Pull Request for branch ``release_M.N.U``. This will
7. On GitHub, create a Pull Request for branch ``release_M.N.U``. This will
trigger the CI runs.

Important: When creating Pull Requests, GitHub by default targets the
``master`` branch. When releasing based on a stable branch, you need to
change the target branch of the Pull Request to ``stable_M.N``.

9. On GitHub, close milestone ``M.N.U``.
8. On GitHub, close milestone ``M.N.U``.

10. On GitHub, once the checks for the Pull Request for branch ``start_M.N.U``
9. On GitHub, once the checks for the Pull Request for branch ``start_M.N.U``
have succeeded, merge the Pull Request (no review is needed). This
automatically deletes the branch on GitHub.

11. Add a new tag for the version that is being released and push it to
10. Add a new tag for the version that is being released and push it to
the remote repo. Clean up the local repo:

git checkout ${BRANCH}
Expand All @@ -157,7 +140,7 @@ local clone of the `pywbem/pywbemtools` Git repo.
git push -f --tags
git branch -D release_${MNU}

12. When releasing based on the master branch, create and push a new stable
11. When releasing based on the master branch, create and push a new stable
branch for the same minor version:

git checkout -b stable_${MN}
Expand All @@ -166,7 +149,7 @@ local clone of the `pywbem/pywbemtools` Git repo.

Note that no GitHub Pull Request is created for any ``stable_*`` branch.

13. When releasing based on the master branch, activate the new stable branch
12. When releasing based on the master branch, activate the new stable branch
``stable_M.N`` on ReadTheDocs:

* Go to https://readthedocs.org/projects/pywbemtools/versions/
Expand All @@ -178,12 +161,12 @@ local clone of the `pywbem/pywbemtools` Git repo.
and that new version is shown in the version selection popup at
https://pywbemtools.readthedocs.io/

14. On GitHub, edit the new tag ``M.N.U``, and create a release description on
13. On GitHub, edit the new tag ``M.N.U``, and create a release description on
it. This will cause it to appear in the Release tab.

You can see the tags in GitHub via Code -> Releases -> Tags.

15. Upload the package to PyPI:
14. Upload the package to PyPI:

make upload

Expand Down
3 changes: 3 additions & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ Released: not yet
This reduces the burden of fixing safety issues that affect only development
packages.

* Dev: Improved release procedure by generalizing the stable branch name
in the test workflow which allowed removing the step to update it.

**Cleanup:**

* Change to used safety-policy-file .safety-policy-yml to keep the safety issue
Expand Down

0 comments on commit babacbd

Please sign in to comment.