Skip to content

Commit a8fe36b

Browse files
authored
feat: add support for add value object intents
chore: refactor release workflow
1 parent a4b079c commit a8fe36b

File tree

19 files changed

+382
-275
lines changed

19 files changed

+382
-275
lines changed

.github/scripts/activate-pyenv.sh

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

.github/workflows/release-please.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write
11+
id-token: write
12+
13+
jobs:
14+
unittests:
15+
uses: ./.github/workflows/run-unittests.yml
16+
with:
17+
python-versions: '["3.9", "3.10", "3.11", "3.12"]'
18+
19+
release:
20+
needs: unittests
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
27+
- name: Set up Python
28+
uses: actions/setup-python@v5
29+
with:
30+
python-version: '3.12'
31+
32+
- name: Install pipenv and dependencies
33+
run: |
34+
python -m pip install --upgrade pip
35+
pip install pipenv
36+
pipenv install --dev
37+
38+
- name: Auto bump version
39+
id: bump
40+
run: |
41+
python scripts/bump_version.py
42+
VERSION=$(grep '__version__' src/codius/version.py | cut -d'"' -f2)
43+
echo "version=$VERSION" >> $GITHUB_OUTPUT
44+
45+
- name: Commit and push version bump
46+
run: |
47+
git config user.name "GitHub Actions"
48+
git config user.email "[email protected]"
49+
git add src/codius/version.py
50+
git commit -m "chore(release): bump version to ${{ steps.bump.outputs.version }}"
51+
git push
52+
53+
- name: Build package
54+
run: pipenv run python -m build
55+
56+
- name: Publish to PyPI
57+
uses: pypa/gh-action-pypi-publish@release/v1
58+
with:
59+
verbose: true
60+
61+
- name: Create GitHub Release
62+
uses: softprops/action-gh-release@v1
63+
with:
64+
tag_name: v${{ steps.bump.outputs.version }}
65+
name: Release v${{ steps.bump.outputs.version }}
66+
generate_release_notes: true

.release-please-manifest.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 0 additions & 39 deletions
This file was deleted.

DUMMY_CHANGELOG.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ upload-test: ## upload package to testpypi repository
124124
upload: ## upload package to pypi repository
125125
TWINE_USERNAME=$(PYPI_USERNAME) TWINE_PASSWORD=$(PYPI_PASSWORD) pipenv run twine upload --skip-existing dist/*
126126

127+
.PHONY: act-release
128+
act-release: ## Run release workflow locally with act
129+
@act push --job release -P ubuntu-latest=catthehacker/ubuntu:act-latest
130+
127131
.PHONY: test-install-all-py
128132
test-install-all-py:
129133
@for PY in 3.9 3.10 3.11 3.12; do \

Pipfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,14 @@ prompt-toolkit = "*"
1717
rich = "*"
1818
tree-sitter = "0.23.2"
1919
tree-sitter-c-sharp = "*"
20+
typing-extensions = "*"
2021

2122
[dev-packages]
22-
pytest = "*"
23-
pyfakefs = "*"
24-
pipfile-requirements = "*"
23+
build = "*"
2524
flake8 = "*"
25+
pipfile-requirements = "*"
26+
pyfakefs = "*"
27+
pytest = "*"
2628
twine = "*"
27-
bump2version = "*"
2829

2930
[requires]

0 commit comments

Comments
 (0)