Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/scripts/activate-pyenv.sh

This file was deleted.

40 changes: 0 additions & 40 deletions .github/workflows/publish.yml

This file was deleted.

30 changes: 0 additions & 30 deletions .github/workflows/release-please.yml

This file was deleted.

66 changes: 66 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Release

on:
push:
branches:
- master
workflow_dispatch:

permissions:
contents: write
id-token: write

jobs:
unittests:
uses: ./.github/workflows/run-unittests.yml
with:
python-versions: '["3.9", "3.10", "3.11", "3.12"]'

release:
needs: unittests
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install pipenv and dependencies
run: |
python -m pip install --upgrade pip
pip install pipenv
pipenv install --dev

- name: Auto bump version
id: bump
run: |
python scripts/bump_version.py
VERSION=$(grep '__version__' src/codius/version.py | cut -d'"' -f2)
echo "version=$VERSION" >> $GITHUB_OUTPUT

- name: Commit and push version bump
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git add src/codius/version.py
git commit -m "chore(release): bump version to ${{ steps.bump.outputs.version }}"
git push

- name: Build package
run: pipenv run python -m build

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true

- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ steps.bump.outputs.version }}
name: Release v${{ steps.bump.outputs.version }}
generate_release_notes: true
3 changes: 0 additions & 3 deletions .release-please-manifest.json

This file was deleted.

39 changes: 0 additions & 39 deletions CHANGELOG.md

This file was deleted.

1 change: 0 additions & 1 deletion DUMMY_CHANGELOG.md

This file was deleted.

4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ upload-test: ## upload package to testpypi repository
upload: ## upload package to pypi repository
TWINE_USERNAME=$(PYPI_USERNAME) TWINE_PASSWORD=$(PYPI_PASSWORD) pipenv run twine upload --skip-existing dist/*

.PHONY: act-release
act-release: ## Run release workflow locally with act
@act push --job release -P ubuntu-latest=catthehacker/ubuntu:act-latest

.PHONY: test-install-all-py
test-install-all-py:
@for PY in 3.9 3.10 3.11 3.12; do \
Expand Down
9 changes: 5 additions & 4 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ prompt-toolkit = "*"
rich = "*"
tree-sitter = "0.23.2"
tree-sitter-c-sharp = "*"
typing-extensions = "*"

[dev-packages]
pytest = "*"
pyfakefs = "*"
pipfile-requirements = "*"
build = "*"
flake8 = "*"
pipfile-requirements = "*"
pyfakefs = "*"
pytest = "*"
twine = "*"
bump2version = "*"

[requires]
Loading