Skip to content

Commit 3da38b4

Browse files
committed
release flow
1 parent 7d211fc commit 3da38b4

6 files changed

Lines changed: 96 additions & 4 deletions

File tree

.github/workflows/publish-pypi.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: "🚀 Publish PyPI"
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
environment:
12+
name: pypi
13+
url: https://pypi.org/p/omenai
14+
permissions:
15+
id-token: write
16+
contents: read
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Set up Python 3.12
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: "3.12"
24+
- name: Install build dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
python -m pip install -e .
28+
python -m pip install -e ".[dev]"
29+
- name: Build distribution artifacts
30+
run: |
31+
python -m build --sdist --wheel
32+
- name: Check distribution artifacts
33+
run: |
34+
python -m twine check dist/*
35+
- name: Publish to PyPI
36+
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/release.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: "🚀 Publish PyPI"
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
environment:
12+
name: pypi
13+
url: https://pypi.org/p/omenai
14+
permissions:
15+
id-token: write
16+
contents: read
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
- name: Set up Python 3.12
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: "3.12"
24+
- name: Install build dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
python -m pip install -e .
28+
python -m pip install -e ".[dev]"
29+
python -m pip install twine
30+
- name: Build distribution artifacts
31+
run: |
32+
python -m build --sdist --wheel
33+
- name: Check distribution artifacts
34+
run: |
35+
python -m twine check dist/*
36+
- name: Publish to PyPI
37+
uses: pypa/gh-action-pypi-publish@release/v1

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,12 @@ More scenarios are under development (contributions welcome):
114114

115115
Environment requirements: Python 3.12+ with `pip` package manager.
116116

117+
```bash
118+
pip install omenai
119+
```
120+
121+
From source:
122+
117123
```bash
118124
git clone https://github.com/StrategyLogic/omen.git
119125
cd omen

README.zh.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,12 @@ graph TD
114114

115115
运行环境要求:Python 3.12+ `pip` 包管理器。
116116

117+
```bash
118+
pip install omenai
119+
```
120+
121+
从源码安装:
122+
117123
```bash
118124
git clone https://github.com/StrategyLogic/omen.git
119125
cd omen

pyproject.toml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ requires = ["setuptools>=68", "wheel"]
33
build-backend = "setuptools.build_meta"
44

55
[project]
6-
name = "omen"
7-
version = "0.2.1"
6+
name = "omenai"
7+
version = "0.1.0"
88
description = "The open-source strategic reasoning engine for technological evolution."
99
readme = "README.md"
1010
requires-python = ">=3.12,<3.13"
1111
authors = [{ name = "StrategyLogic" }]
12-
license = { text = "AGPL-3.0-or-later" }
12+
license = "AGPL-3.0-or-later"
13+
license-files = ["LICENSE", "NOTICE.md"]
1314
dependencies = [
1415
"pydantic>=2.8.0",
1516
"jsonschema>=4.23.0",
@@ -28,13 +29,19 @@ dependencies = [
2829
[project.scripts]
2930
omen = "omen.cli.main:main"
3031

32+
[project.urls]
33+
Homepage = "https://github.com/StrategyLogic/omen"
34+
Repository = "https://github.com/StrategyLogic/omen"
35+
Issues = "https://github.com/StrategyLogic/omen/issues"
36+
3137
[project.optional-dependencies]
3238
dev = [
3339
"pytest>=8.2",
3440
"ruff>=0.6.0",
3541
"mypy>=1.10",
3642
"pylint>=3.2.0",
3743
"build>=1.2.2",
44+
"twine>=6.1.0",
3845
]
3946

4047
[tool.setuptools]

tests/test_smoke.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88

99
def test_package_version_is_defined() -> None:
10-
assert __version__ == "0.1.0"
10+
assert __version__ == "0.2.1"
1111

1212

1313
def test_smoke_deterministic_simulate_cli(tmp_path: Path, monkeypatch) -> None:

0 commit comments

Comments
 (0)