Skip to content

Commit

Permalink
chore: update guidelines for publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
WSH032 committed Dec 1, 2023
1 parent 851e59b commit 7182e5f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
!!! danger
**This version has security vulnerabilities, please stop using it.**

[unreleased]: https://github.com/WSH032/fastapi-proxy-lib/compare/v0.0.1b0...HEAD
[unreleased]: https://github.com/WSH032/fastapi-proxy-lib/tree/HEAD
[0.0.1b0]: https://github.com/WSH032/fastapi-proxy-lib/releases/tag/v0.0.1b0
20 changes: 15 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,27 +156,37 @@ Please check whether the `ver_sync` works properly, then you can accept the PR.

## Publish and Release 🚀

**^^First, edit `CHANGELOG.md` to record the changes.^^**
**^^First, check-out to a new branch, edit `CHANGELOG.md` to record the changes.^^**

Then, please refer to:

- `.github/workflows/publish.yml`
- <https://github.com/frankie567/hatch-regex-commit>
- <https://hatch.pypa.io/latest/version/#updating>

Update version with:
Update version in **^^new branch^^** with:

```shell
git add .
hatch version {new_version}
```

It will create a commit and tag automatically, then, push the **tag** to GitHub.
It will create a commit and tag automatically.

Then, push the **new branch** with **tag** to GitHub, and create a PR to `main` branch.

!!! warning
The `bump version` PR must have **only one commit with the corresponding tag**; otherwise, it will be rejected.

Review the PR, if it's ok, **rebase** it to `main` branch **^^in local^^**

!!! warning
You should tag in another branch, then rebase it to `main` branch **in local**.<br>
**DO NOT rebase with tag in GitHub**, refer to <https://docs.github.com/zh/authentication/managing-commit-signature-verification/about-commit-signature-verification#signature-verification-for-rebase-and-merge>

Check if everything is ok, for example, **check if the tag is on the `main` branch**.
Check if everything is ok, for example:

- **check if the tag is on the `main` branch**.
- check if the link in `CHANGELOG.md` is correct.

If so, make a `approve` in environment `pypi` for the workflow.

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ commit_message = "chore(version): 🚀 bump version v{current_version} → v{new
tag_message = "🚀 bump version v{current_version} → v{new_version}"
# NOTE: `v` prefix is required by github `publish.yml` action
tag_name = "v{new_version}"
check_dirty = false


[tool.hatch.envs.default]
Expand Down

0 comments on commit 7182e5f

Please sign in to comment.