Skip to content

Commit 08aa8e6

Browse files
authored
patch: workflow-updates (#11)
2 parents 21cf76a + 113c74e commit 08aa8e6

File tree

4 files changed

+49
-25
lines changed

4 files changed

+49
-25
lines changed

.github/workflows/pypi-publish.yml

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,21 @@
1-
name: Bump, Publish, and Release
1+
name: Publish to PyPi
22

33
on:
4-
workflow_dispatch:
5-
branches:
6-
- main
7-
inputs:
8-
newversion:
9-
description: "Bump Type (major minor patch)"
10-
required: true
11-
default: "patch"
12-
type: choice
13-
options:
14-
- patch
15-
- minor
16-
- major
17-
testpublish:
18-
description: "Publish to TestPypi"
19-
default: false
20-
type: boolean
4+
push:
5+
tags:
6+
- "v*"
217

228
jobs:
9+
lint:
10+
uses: prosegrinder/.github/.github/workflows/poetry-lint.yaml@main
11+
12+
test:
13+
needs: lint
14+
uses: prosegrinder/.github/.github/workflows/poetry-test.yaml@main
15+
2316
publish:
24-
uses: prosegrinder/.github/.github/workflows/python-poetry-publish.yaml@main
25-
with:
26-
newversion: ${{ github.event.inputs.newversion }}
27-
testpublish: ${{ 'true' == github.event.inputs.testpublish }}
17+
needs: test
18+
uses: prosegrinder/.github/.github/workflows/poetry-publish.yaml@main
2819
secrets:
2920
TEST_PYPI_API_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }}
3021
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
31-
VERSION_BUMP_TAG_TOKEN: ${{ secrets.VERSION_BUMP_TAG_TOKEN }}

.github/workflows/python-ci.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,15 @@ concurrency:
88
cancel-in-progress: true
99

1010
jobs:
11-
python-poetry-ci:
12-
uses: prosegrinder/.github/.github/workflows/python-poetry-ci.yaml@main
11+
lint:
12+
uses: prosegrinder/.github/.github/workflows/poetry-lint.yaml@main
13+
14+
test:
15+
needs: lint
16+
uses: prosegrinder/.github/.github/workflows/poetry-test.yaml@main
17+
18+
cz-dry-run:
19+
needs: test
20+
uses: prosegrinder/.github/.github/workflows/poetry-cz-dry-run.yaml@main
21+
secrets:
22+
VERSION_BUMP_TAG_TOKEN: "${{ secrets.VERSION_BUMP_TAG_TOKEN }}"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Bump Version and Create Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release:
10+
if: "!startsWith(github.event.head_commit.message, 'bump:')"
11+
# Don't run 'bump:'
12+
uses: prosegrinder/.github/.github/workflows/poetry-release.yaml@main
13+
secrets:
14+
VERSION_BUMP_TAG_TOKEN: "${{ secrets.VERSION_BUMP_TAG_TOKEN }}"

pyproject.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
[tool.commitizen]
2+
version = "1.1.1"
3+
tag_format = "v$version"
4+
update_changelog_on_bump = true
5+
changelog_incremental = true
6+
bump_message = "bump: $current_version → $new_version"
7+
version_files = [
8+
"pyproject.toml:version",
9+
]
10+
111
[build-system]
212
requires = ["poetry-core"]
313
build-backend = "poetry.core.masonry.api"

0 commit comments

Comments
 (0)