Skip to content

Commit 0e535bc

Browse files
ci: add configurations for python-semantic-release
1 parent 2704b1f commit 0e535bc

File tree

2 files changed

+29
-3
lines changed

2 files changed

+29
-3
lines changed

.github/workflows/deploy.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ permissions:
2222
jobs:
2323
release:
2424
runs-on: ubuntu-latest
25+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
2526
concurrency:
2627
group: ${{ github.workflow }}-release-${{ github.ref_name }}
2728
cancel-in-progress: false
@@ -45,14 +46,22 @@ jobs:
4546
run: |
4647
git reset --hard ${{ github.sha }}
4748
49+
- name: Set up Python
50+
uses: actions/setup-python@v6
51+
with:
52+
python-version: "3.13"
53+
4854
- name: Action | Semantic Version Release
4955
id: release
5056
# Adjust tag with desired version if applicable.
5157
uses: python-semantic-release/python-semantic-release@v10.5.3
5258
with:
5359
github_token: ${{ secrets.GITHUB_TOKEN }}
54-
git_committer_name: "github-actions"
55-
git_committer_email: "actions@users.noreply.github.com"
60+
git_committer_name: "Watson Github Bot"
61+
git_committer_email: "watdevex@us.ibm.com"
62+
63+
- name: Build a binary wheel and a source tarball
64+
run: pip3 install setuptools wheel twine build && python setup.py sdist
5665

5766
- name: Publish | Upload to GitHub Release Assets
5867
uses: python-semantic-release/publish-action@v10.5.3

pyproject.toml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
11
[build-system]
22
requires = ["setuptools", "wheel"]
3-
build-backend = "setuptools.build_meta"
3+
build-backend = "setuptools.build_meta"
4+
5+
[tool.semantic_release]
6+
version_variables = [
7+
"setup.py:__version__",
8+
"ibm_watson/version.py:__version__",
9+
]
10+
version_toml = []
11+
branch = "master"
12+
13+
[tool.semantic_release.changelog]
14+
exclude_commit_patterns = [
15+
'''chore(?:\([^)]*?\))?: .+''',
16+
'''ci(?:\([^)]*?\))?: .+''',
17+
'''refactor(?:\([^)]*?\))?: .+''',
18+
'''test(?:\([^)]*?\))?: .+''',
19+
'''build\((?!deps\): .+)''',
20+
]

0 commit comments

Comments
 (0)