Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
c4ddf7e
ci(semantic-release): #67: add configs for semantic-release
JDRkow May 14, 2026
594cd97
ci(semantic-release): #67: disable python-semantic-release
JDRkow May 14, 2026
dbf7597
ci(semantic-release): #67: rewrite workflow of versioning
JDRkow May 19, 2026
8ee93e4
ci(semantic-release): #67: add feature branch config for testing
JDRkow May 19, 2026
3167acb
ci(semantic-release): #67: add exec plugin for versioning poetry rele…
JDRkow May 19, 2026
af48403
ci(semantic-release): #67: revert test config
JDRkow May 19, 2026
3891081
ci(semantic-release): #67: add builded files to giyhub releases
JDRkow May 19, 2026
8f0b922
ci(semantic-release): #67: add backmerge plugin
JDRkow May 19, 2026
09cb41a
chore(semantic-release): #67: add commentaries for semantic-release c…
JDRkow May 19, 2026
c7f57a2
docs(contributing): #67: describe how releases are happens
JDRkow May 19, 2026
92ad4b3
ci(semantic-release): #67: delete dry-run from action
JDRkow May 19, 2026
fd27234
Merge branch 'develop' into feature/#67-rewrite-release-workflow
JDRkow May 19, 2026
4bf59ef
chore(poetry): #67: lock poetry dependencies
JDRkow May 19, 2026
a09561f
Merge branch 'develop' into feature/#67-rewrite-release-workflow
aasheptunov May 20, 2026
a68bae6
chore(poetry): #67: lock poetry dependencies
aasheptunov May 20, 2026
7aceb2c
ci(semantic-release): #67: update plugin in ci
JDRkow May 20, 2026
b32d0e8
chore(semantic-release): #67: one more new line
JDRkow May 20, 2026
b0e3361
chore(semantic-release): #67: delete unused semantic-release plugin
JDRkow May 20, 2026
7c57fa1
docs(contributing): #67: add more commit message to the readme
JDRkow May 20, 2026
f91a81a
docs(contributing): #67: describe how releases are publish into pypi
JDRkow May 22, 2026
688dda9
docs(contributing): #67: make more readable
JDRkow May 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 22 additions & 12 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- master
- 'release/*'
- develop

permissions:
contents: write
Expand Down Expand Up @@ -80,17 +81,26 @@ jobs:
virtualenvs-create: true
virtualenvs-in-project: true

- name: Semantic Version Release
id: release
uses: python-semantic-release/python-semantic-release@v8.3.0
- name: Set up Node.js
uses: actions/setup-node@v6
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
git_committer_name: "github-actions"
git_committer_email: "actions@users.noreply.github.com"
node-version: 24.15.0

- name: Upload to GitHub Release Assets
uses: python-semantic-release/publish-action@v10.4.1
if: steps.release.outputs.released == 'true'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.release.outputs.tag }}
- name: Install semantic-release and plugins
run: |
npm install \
semantic-release@25.0.3 \
@semantic-release/exec@7.1.0 \
@semantic-release/commit-analyzer@13.0.1 \
@semantic-release/release-notes-generator@14.1.1 \
@semantic-release/changelog@6.0.3 \
@semantic-release/git@10.0.1 \
@semantic-release/github@12.0.8 \
conventional-changelog-conventionalcommits@9.3.1 \
@kilianpaquier/semantic-release-backmerge@1.7.5

- name: Semantic Version Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npx semantic-release
72 changes: 70 additions & 2 deletions CONTRIBUTING.md
Comment thread
JDRkow marked this conversation as resolved.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The 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
Expand Up @@ -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.

Expand Down Expand Up @@ -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` |
Comment thread
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
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Every release (stable, RC, and alpha) automatically triggers the `publish-package.yml` workflow.
Workflow consists of two jobs:
Every release (stable, RC, and alpha) automatically triggers the `publish-package.yml` workflow. In addition, the workflow can be started manually.
Workflow consists of two jobs:


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
Loading
Loading