Skip to content

Commit 9d4152e

Browse files
committed
Update for pypi release
1 parent 181b21e commit 9d4152e

File tree

3 files changed

+97
-3
lines changed

3 files changed

+97
-3
lines changed

.github/workflows/publish.yml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
# Allow manual trigger for testing
7+
workflow_dispatch:
8+
inputs:
9+
test_pypi:
10+
description: 'Publish to TestPyPI instead of PyPI'
11+
required: false
12+
default: 'false'
13+
type: boolean
14+
15+
jobs:
16+
build:
17+
name: Build distribution
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Set up Python
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: '3.12'
27+
28+
- name: Install build dependencies
29+
run: |
30+
python -m pip install --upgrade pip
31+
pip install build twine
32+
33+
- name: Build package
34+
run: python -m build
35+
36+
- name: Check package
37+
run: |
38+
twine check dist/*
39+
echo "=== Built packages ==="
40+
ls -la dist/
41+
42+
- name: Upload artifacts
43+
uses: actions/upload-artifact@v4
44+
with:
45+
name: python-package-distributions
46+
path: dist/
47+
48+
publish-testpypi:
49+
name: Publish to TestPyPI
50+
needs: build
51+
runs-on: ubuntu-latest
52+
if: github.event_name == 'workflow_dispatch' && github.event.inputs.test_pypi == 'true'
53+
54+
environment:
55+
name: testpypi
56+
url: https://test.pypi.org/p/behaverify
57+
58+
permissions:
59+
id-token: write # Required for trusted publishing
60+
61+
steps:
62+
- name: Download artifacts
63+
uses: actions/download-artifact@v4
64+
with:
65+
name: python-package-distributions
66+
path: dist/
67+
68+
- name: Publish to TestPyPI
69+
uses: pypa/gh-action-pypi-publish@release/v1
70+
with:
71+
repository-url: https://test.pypi.org/legacy/
72+
73+
publish-pypi:
74+
name: Publish to PyPI
75+
needs: build
76+
runs-on: ubuntu-latest
77+
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.test_pypi == 'false')
78+
79+
environment:
80+
name: pypi
81+
url: https://pypi.org/p/behaverify
82+
83+
permissions:
84+
id-token: write # Required for trusted publishing
85+
86+
steps:
87+
- name: Download artifacts
88+
uses: actions/download-artifact@v4
89+
with:
90+
name: python-package-distributions
91+
path: dist/
92+
93+
- name: Publish to PyPI
94+
uses: pypa/gh-action-pypi-publish@release/v1

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "behaverify"
7-
version = "0.0.1"
7+
version = "1.0.0"
88
authors = [
99
{ name="Serena Serafina Serbinowska", email="serena.serbinowska.work@proton.me" }
1010
]
1111
description = "A tool for formal verification of behavior trees"
1212
readme = "README.md"
1313
requires-python = ">=3.10"
1414
classifiers = [
15-
"Development Status :: 3 - Alpha",
15+
"Development Status :: 5 - Production/Stable",
1616
"Intended Audience :: Developers",
1717
"Intended Audience :: Science/Research",
1818
"Operating System :: OS Independent",

src/behaverify/behaverify.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
from behaverify.grid_world_draw.parse_python_output import handle_file as grid_world_draw_python_output
2525
from behaverify.behaverify_gui import main as gui_main
2626

27-
__version__ = '0.0.1'
27+
__version__ = '1.0.0'
2828

2929

3030
def error_exit(message, suggestion=None):

0 commit comments

Comments
 (0)