Skip to content
This repository was archived by the owner on Jul 12, 2025. It is now read-only.

Commit 921dc78

Browse files
authored
Merge pull request #25 from ewjoachim/change-versionning-system
2 parents 0c1791b + c139e33 commit 921dc78

File tree

3 files changed

+74
-8
lines changed

3 files changed

+74
-8
lines changed

.github/workflows/release.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
tag:
7+
description: "Tag to release"
8+
required: true
9+
type: string
10+
11+
jobs:
12+
release:
13+
name: Release
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Install poetry
19+
run: pipx install poetry
20+
21+
- uses: actions/setup-python@v5
22+
with:
23+
cache: "poetry"
24+
25+
- run: poetry install
26+
27+
- run: poetry version "${{ github.event.inputs.tag }}"
28+
29+
- run: git commit -am "Release ${{ github.event.inputs.tag }}"
30+
env:
31+
GIT_AUTHOR_NAME: "GitHub Actions"
32+
GIT_AUTHOR_EMAIL: "41898282+github-actions[bot]@users.noreply.github.com"
33+
GIT_COMMITTER_NAME: "GitHub Actions"
34+
GIT_COMMITTER_EMAIL: "41898282+github-actions[bot]@users.noreply.github.com"
35+
36+
- run: git push origin
37+
38+
- run: >
39+
gh release create "${{ github.event.inputs.tag }}"
40+
--title "${{ github.event.inputs.tag }}"
41+
--generate-notes
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CONTRIBUTING.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Contributing
2+
3+
Contributions are welcome! The project is quite small so feel free to
4+
familiarize yourself with the codebase and open an issue or a pull request.
5+
Before doing anything important, feel free to open an issue to discuss it.
6+
7+
All interactions are required to follow the
8+
[Code of Conduct](CODE_OF_CONDUCT.md) which sets rules for the community.
9+
10+
## Development
11+
12+
The project uses [Poetry](https://python-poetry.org/),
13+
[pre-commit](https://pre-commit.com/), and
14+
[pytest](https://docs.pytest.org/en/stable/).
15+
16+
```console
17+
$ poetry install
18+
$ pre-commit install
19+
$ poetry run pytest
20+
```
21+
22+
If you have any questions, feel free to ask them in the issues.
23+
24+
# Internal documentation
25+
26+
## Releasing
27+
28+
Launch the `Release`worfklow with the desired tag.

pyproject.toml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[build-system]
2-
requires = ["poetry-core", "poetry-dynamic-versioning"]
3-
build-backend = "poetry_dynamic_versioning.backend"
2+
requires = ["poetry-core"]
3+
build-backend = "poetry.core.masonry.api"
44

55
[tool.poetry]
66
name = "poetry_to_pre_commit"
7-
version = "0.0.0"
7+
version = "2.1.0"
88
description = "Sync versions in .pre-commit-config.yaml from poetry.lock"
99
authors = ["Joachim Jablon"]
1010
license = "MIT License"
@@ -41,11 +41,6 @@ pytest = "*"
4141
pytest-cov = "*"
4242
pytest-mock = "*"
4343

44-
[tool.poetry-dynamic-versioning]
45-
enable = true
46-
pattern = '(?P<base>\d+(\.\d+)*)([-._]?((?P<stage>[a-zA-Z]+)[-._]?(?P<revision>\d+)?))?$'
47-
vcs = 'git'
48-
4944
[tool.pytest.ini_options]
5045
addopts = [
5146
"--cov-report=term-missing",

0 commit comments

Comments
 (0)