Skip to content

Commit

Permalink
chore(*): Add python-semantic-release-support
Browse files Browse the repository at this point in the history
Handles automatic versioning and changelog generation with in a CI/CD
context. Support requires:
1) Settings in python.toml
2) Version number in scripts/__init__.py
3) Action in workflows
  • Loading branch information
rbpatt2019 committed Jun 4, 2021
1 parent e2e7f9b commit e25ae1d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,14 @@ jobs:
uses: excitedleigh/[email protected]
- name: safety
run: nox -s security
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Python Semantic Release
uses: relekang/python-semantic-release@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
13 changes: 11 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
[tool.semantic_release]
branch = "main"
version_variable = [
"scripts/__init__.py:__version__"
]
changelog_file = "CHANGELOG.rst"
upload_to_pypi = false
upload_to_release = false

[tool.coverage.run]
branch = true
source = ["scripts"]
Expand All @@ -6,8 +15,8 @@ omit = ["*/__init__.py"]
[tool.coverage.report]
show_missing = true
exclude_lines = [
'pragma: no cover',
'if __name__ == "__main__":',
'pragma: no cover',
'if __name__ == "__main__":',
]

[tool.pytest.ini_options]
Expand Down
1 change: 1 addition & 0 deletions scripts/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# -*- coding: utf-8 -*-
"""Analysis scripts for BIC086."""
__version__ = "0.0.0"

0 comments on commit e25ae1d

Please sign in to comment.