Skip to content

Commit 3264bc6

Browse files
committed
Move version.py into package dir; replace workflows with shared gh-automations callers
- Move version.py from root to speakeronnx/version.py - Update pyproject.toml attr path to speakeronnx.version.__version__ - Replace inline unit_tests.yml with shared build-tests.yml caller - Split legacy publish.yml (master→alpha) into release_workflow.yml (dev→alpha) + publish_stable.yml (master→stable) - Add lint, coverage, license_check, pip_audit, repo-health, release-preview, conventional-label workflows
1 parent 0de32c5 commit 3264bc6

14 files changed

Lines changed: 149 additions & 31 deletions

.github/workflows/build-tests.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Build Tests
2+
3+
on:
4+
pull_request:
5+
branches: [dev, master, main]
6+
workflow_dispatch:
7+
8+
jobs:
9+
build:
10+
uses: OpenVoiceOS/gh-automations/.github/workflows/build-tests.yml@dev
11+
with:
12+
python_versions: '["3.10", "3.11", "3.12", "3.13", "3.14"]'
13+
install_extras: 'test'
14+
test_path: 'tests'
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: conventional-release-labels
2+
on:
3+
pull_request_target:
4+
types: [opened, edited]
5+
jobs:
6+
label:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: bcoe/conventional-release-labels@v1

.github/workflows/coverage.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Code Coverage
2+
3+
on:
4+
pull_request:
5+
branches: [dev]
6+
workflow_dispatch:
7+
8+
jobs:
9+
coverage:
10+
uses: OpenVoiceOS/gh-automations/.github/workflows/coverage.yml@dev
11+
with:
12+
python_version: '3.11'
13+
coverage_source: 'speakeronnx'
14+
test_path: 'tests/'
15+
install_extras: 'dev'
16+
min_coverage: 0
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: License Check
2+
3+
on:
4+
pull_request:
5+
branches: [dev]
6+
workflow_dispatch:
7+
8+
jobs:
9+
license_check:
10+
uses: OpenVoiceOS/gh-automations/.github/workflows/license-check.yml@dev

.github/workflows/lint.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Lint
2+
3+
on:
4+
pull_request:
5+
branches: [dev, master, main]
6+
workflow_dispatch:
7+
8+
jobs:
9+
lint:
10+
uses: OpenVoiceOS/gh-automations/.github/workflows/lint.yml@dev
11+
with:
12+
ruff: true
13+
pre_commit: false

.github/workflows/pip_audit.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: PIP Audit
2+
3+
on:
4+
pull_request:
5+
branches: [dev]
6+
workflow_dispatch:
7+
8+
jobs:
9+
pip_audit:
10+
uses: OpenVoiceOS/gh-automations/.github/workflows/pip-audit.yml@dev

.github/workflows/publish.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Publish Stable Release
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [master, main]
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
publish_stable:
13+
if: github.actor != 'github-actions[bot]'
14+
uses: OpenVoiceOS/gh-automations/.github/workflows/publish-stable.yml@dev
15+
secrets:
16+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
17+
MATRIX_TOKEN: ${{ secrets.MATRIX_TOKEN }}
18+
with:
19+
version_file: 'speakeronnx/version.py'
20+
publish_pypi: true
21+
publish_release: true
22+
sync_dev: true
23+
notify_matrix: true
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Release Preview
2+
3+
on:
4+
pull_request:
5+
branches: [dev]
6+
workflow_dispatch:
7+
8+
jobs:
9+
release_preview:
10+
uses: OpenVoiceOS/gh-automations/.github/workflows/release-preview.yml@dev
11+
with:
12+
package_name: 'speakeronnx'
13+
version_file: 'speakeronnx/version.py'
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Release Alpha and Propose Stable
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
types: [closed]
7+
branches: [dev]
8+
9+
permissions:
10+
contents: write
11+
pull-requests: write
12+
13+
jobs:
14+
publish_alpha:
15+
if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch'
16+
uses: OpenVoiceOS/gh-automations/.github/workflows/publish-alpha.yml@dev
17+
secrets:
18+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
19+
MATRIX_TOKEN: ${{ secrets.MATRIX_TOKEN }}
20+
with:
21+
branch: 'dev'
22+
version_file: 'speakeronnx/version.py'
23+
update_changelog: true
24+
publish_prerelease: true
25+
propose_release: true
26+
changelog_max_issues: 50
27+
publish_pypi: true
28+
notify_matrix: true

0 commit comments

Comments
 (0)