diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 36584159..b9c0ef01 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,40 +2,30 @@ name: Release on: push: - branches: [main, master] + tags: + - 'v*' permissions: contents: write - id-token: write jobs: release: - name: Semantic Release runs-on: ubuntu-latest - concurrency: release steps: - uses: actions/checkout@v4 - with: - fetch-depth: 0 - token: ${{ secrets.GITHUB_TOKEN }} - uses: actions/setup-python@v5 with: python-version: "3.12" cache: "pip" - - name: Install dependencies - run: pip install python-semantic-release build - - - name: Python Semantic Release - id: release - uses: python-semantic-release/python-semantic-release@v9 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - root_options: --no-commit + - name: Build + run: | + pip install build + python -m build - - name: Publish to PyPI - if: steps.release.outputs.released == 'true' - uses: pypa/gh-action-pypi-publish@release/v1 + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 with: - password: ${{ secrets.PYPI_TOKEN }} + files: dist/* + generate_release_notes: true diff --git a/pyproject.toml b/pyproject.toml index f21a6ed6..d7eb86b1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -118,33 +118,3 @@ exclude = ["tests"] [[tool.mypy.overrides]] module = ["tests.*"] ignore_errors = true - -[tool.semantic_release] -version_toml = ["pyproject.toml:project.version"] -branch = "major" -build_command = "pip install build && python -m build" -push = false - -[tool.semantic_release.changelog] -changelog_file = "CHANGELOG.md" -exclude_commits = ["^chore\\(deps\\)"] - -[[tool.semantic_release.changelog.categories]] -title = "Features" -match = "feat" - -[[tool.semantic_release.changelog.categories]] -title = "Bug Fixes" -match = "fix" - -[[tool.semantic_release.changelog.categories]] -title = "Breaking Changes" -match = "break" - -[[tool.semantic_release.changelog.categories]] -title = "Documentation" -match = "docs" - -[[tool.semantic_release.changelog.categories]] -title = "Other" -match = ".*"