-
Notifications
You must be signed in to change notification settings - Fork 3
ci(semantic-release): #67: rewrite workflow of releases #77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
c4ddf7e
594cd97
dbf7597
8ee93e4
3167acb
af48403
3891081
8f0b922
09cb41a
c7f57a2
92ad4b3
fd27234
4bf59ef
a09561f
a68bae6
7aceb2c
b32d0e8
b0e3361
7c57fa1
f91a81a
688dda9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it possible to add information about what happens after the workflow runs and the package is published? I mean - New version will be added to the list of versions on the PyPI library page, or will an existing version be overwritten (if triggered manually)? |
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -4,7 +4,13 @@ To contribute to the c2pie package development, you can use one of the following | |||||||||||||
|
|
||||||||||||||
| ### General principles | ||||||||||||||
|
|
||||||||||||||
| 🔸 Use Conventional Commits (e.g., `feat:`, `fix:`, `style(ruff):`, `ci:`). | ||||||||||||||
| 🔸 Use Conventional Commits (e.g., `feat(scope):`, `fix:`, `style(ruff):`, `ci:`). | ||||||||||||||
|
|
||||||||||||||
| 🔸 Name branches using Git Flow convention with the issue number and short description | ||||||||||||||
| (e.g., `feature/#67-add-validation`, `fix/#42-crash-on-empty-input`). | ||||||||||||||
|
|
||||||||||||||
| 🔸 Name pull requests using Conventional Commits format with the issue number | ||||||||||||||
| (e.g., `feat(api): #67 add ingredient validation`, `fix(parser): #42 handle empty input`). | ||||||||||||||
|
|
||||||||||||||
| 🔸 Run `Lint and Format` task before committing. | ||||||||||||||
|
|
||||||||||||||
|
|
@@ -89,4 +95,66 @@ ruff check . --fix | |||||||||||||
|
|
||||||||||||||
| The latter option is also available via the VC Code task `Lint and Format` | ||||||||||||||
|
|
||||||||||||||
| <br> | ||||||||||||||
| <br> | ||||||||||||||
|
|
||||||||||||||
| ## Release Process | ||||||||||||||
|
|
||||||||||||||
| Releases are fully automated via [semantic-release](https://semantic-release.gitbook.io/). No manual version bumping or tagging is needed. | ||||||||||||||
|
|
||||||||||||||
| ### Release triggers | ||||||||||||||
|
|
||||||||||||||
| A release is created automatically on push to `master`, `release/*`, or `develop` if there are commits with a release-triggering type (`feat`, `fix`, `docs`, `refactor`) since the last release. | ||||||||||||||
|
|
||||||||||||||
| ### Version tags | ||||||||||||||
|
|
||||||||||||||
| ``` | ||||||||||||||
| develop → 1.4.0-alpha.1, 1.4.0-alpha.2, ... | ||||||||||||||
| release/1.4.0 → 1.4.0-rc.1, 1.4.0-rc.2, ... | ||||||||||||||
| master → 1.4.0 | ||||||||||||||
| ``` | ||||||||||||||
|
|
||||||||||||||
| ### Preparing a release | ||||||||||||||
|
|
||||||||||||||
| 1. Create a `release/X.Y.0` branch from `develop`. | ||||||||||||||
|
|
||||||||||||||
| 2. Only bug fixes and release-related commits are made on this branch. Each push generates a new RC: `1.4.0-rc.1`, `1.4.0-rc.2`, etc. | ||||||||||||||
|
|
||||||||||||||
| 3. When the release is ready, merge into `master` via PR. The stable release `1.4.0` is created automatically on merge. | ||||||||||||||
|
|
||||||||||||||
| ### Preparing a alpha release | ||||||||||||||
|
|
||||||||||||||
| 1. Create a `feature/*` or `fix/*` branch from `develop`. | ||||||||||||||
| > Note: naming of branch will be with number of issue and name of issue (e.g. `feature/#67-add-feature`). | ||||||||||||||
|
|
||||||||||||||
| 2. Make the changes. | ||||||||||||||
|
|
||||||||||||||
| 3. When changes are made, merge into `develop`. The alpha release `1.4.0-alpha.1` is created automatically on merge. | ||||||||||||||
|
|
||||||||||||||
| ### Version bump | ||||||||||||||
|
|
||||||||||||||
| | Commit type | Bump | Example | | ||||||||||||||
| |---|---|---| | ||||||||||||||
| | `fix` / `docs` / `refactor` | patch | `1.4.0 → 1.4.1` | | ||||||||||||||
| | `feat` | minor | `1.4.0 → 1.5.0` | | ||||||||||||||
| | `feat!` / `BREAKING CHANGE` | major | `1.4.0 → 2.0.0` | | ||||||||||||||
|
JDRkow marked this conversation as resolved.
|
||||||||||||||
|
|
||||||||||||||
| ### Backmerge | ||||||||||||||
|
|
||||||||||||||
| After every release on `master` or `release/*`, semantic-release automatically merges the release commit back into `develop`. This keeps `develop` in sync with the latest released version and ensures that the release commit (with updated `CHANGELOG.md` and `pyproject.toml`) is not lost. | ||||||||||||||
|
|
||||||||||||||
| | Release on | Merged back into | | ||||||||||||||
| |---|---| | ||||||||||||||
| | `master` | `develop` | | ||||||||||||||
| | `release/*` | `develop` | | ||||||||||||||
|
|
||||||||||||||
| > Note: Backmerged commit to the `develop` branch has the `[skip ci]` tag, so a new alpha release from the `develop` branch will not be created. | ||||||||||||||
|
|
||||||||||||||
| ### PyPI Publishing | ||||||||||||||
|
|
||||||||||||||
| Every release (stable, RC, and alpha) automatically triggers the `publish-package.yml` workflow. | ||||||||||||||
|
|
||||||||||||||
| Workflow consists of two jobs: | ||||||||||||||
|
Comment on lines
+154
to
+156
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
|
||||||||||||||
| 1. **Build** — installs Poetry and builds the package via `poetry build` | ||||||||||||||
| 2. **Publish** — uploads the built distributions to [PyPI](https://pypi.org/p/c2pie) | ||||||||||||||
| using the official [`pypa/gh-action-pypi-publish`](https://github.com/pypa/gh-action-pypi-publish) action | ||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.