Skip to content

Commit ca78642

Browse files
author
Oumou
committed
fix: adding semantic versioning
1 parent 8903414 commit ca78642

File tree

5 files changed

+67
-12
lines changed

5 files changed

+67
-12
lines changed

.github/workflows/publish_pypi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: PyPI
33
on:
44
push:
55
tags:
6-
- '*'
6+
- 'v*'
77

88
jobs:
99
build-n-publish:
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
name: Release Please
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
9+
permissions:
10+
contents: write
11+
pull-requests: write
12+
13+
jobs:
14+
release-please:
15+
runs-on: ubuntu-latest
16+
outputs:
17+
release_created: ${{ steps.release.outputs.release_created }}
18+
tag_name: ${{ steps.release.outputs.tag_name }}
19+
upload_url: ${{ steps.release.outputs.upload_url }}
20+
steps:
21+
- uses: googleapis/release-please-action@v4
22+
id: release
23+
with:
24+
token: ${{ secrets.GITHUB_TOKEN }}
25+
26+
build-and-upload:
27+
needs: release-please
28+
if: needs.release-please.outputs.release_created
29+
runs-on: ubuntu-latest
30+
permissions:
31+
contents: write
32+
steps:
33+
- uses: actions/checkout@v4
34+
- uses: actions/setup-python@v5
35+
with:
36+
python-version: '3.12'
37+
- name: Build distribution
38+
run: |
39+
python -m pip install build
40+
python -m build
41+
- name: Upload release artifacts
42+
env:
43+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
run: gh release upload ${{ needs.release-please.outputs.tag_name }} dist/*

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.2.3"
3+
}

pyproject.toml

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

55
[project]
66
name = "omero-metrics"
@@ -26,7 +26,7 @@ dynamic = [
2626
"classifiers",
2727
"dependencies",
2828
]
29-
version = "0.2.3.post74.dev0+208830a"
29+
version = "0.2.3"
3030

3131
[project.urls]
3232
homepage = "https://github.com/pro-dho/omero-metrics"
@@ -97,14 +97,6 @@ poetry = "^2"
9797
isort = "^6"
9898
pre-commit = "^4"
9999

100-
[tool.poetry.requires-plugins]
101-
poetry-dynamic-versioning = ">=1.5.2" # current 1.8.2
102-
103-
[tool.poetry-dynamic-versioning]
104-
enable = false
105-
vcs = "git"
106-
style = "pep440"
107-
#strict = true
108100

109101
[tool.pytest.ini_options]
110102
DJANGO_SETTINGS_MODULE = "omeroweb.settings"

release-please-config.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3+
"packages": {
4+
".": {
5+
"release-type": "python",
6+
"package-name": "omero-metrics",
7+
"changelog-path": "CHANGELOG.md",
8+
"include-v-in-tag": true,
9+
"bump-minor-pre-major": true,
10+
"bump-patch-for-minor-pre-major": true,
11+
"extra-files": [
12+
"pyproject.toml"
13+
]
14+
}
15+
}
16+
}

0 commit comments

Comments
 (0)