From 97059420c79553cefa0d204dbf9a026cbed17c59 Mon Sep 17 00:00:00 2001 From: "David L. Day" Date: Mon, 19 Dec 2022 15:29:39 -0500 Subject: [PATCH 1/4] fix: added release workflow --- .github/workflows/python-release.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/workflows/python-release.yml diff --git a/.github/workflows/python-release.yml b/.github/workflows/python-release.yml new file mode 100644 index 0000000..5d7f7e5 --- /dev/null +++ b/.github/workflows/python-release.yml @@ -0,0 +1,14 @@ +name: Bump Version and Create Release + +on: + push: + branches: + - main + +jobs: + release: + if: "!startsWith(github.event.head_commit.message, 'bump:')" + # Don't run 'bump:' + uses: prosegrinder/.github/.github/workflows/poetry-release.yaml@main + secrets: + VERSION_BUMP_TAG_TOKEN: "${{ secrets.VERSION_BUMP_TAG_TOKEN }}" From e8586f2635a621c4222be6e57cec815650994a4b Mon Sep 17 00:00:00 2001 From: "David L. Day" Date: Mon, 19 Dec 2022 15:29:49 -0500 Subject: [PATCH 2/4] fix: publish on tag v --- .github/workflows/pypi-publish.yml | 36 +++++++++++------------------- 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml index fea19ef..5821187 100644 --- a/.github/workflows/pypi-publish.yml +++ b/.github/workflows/pypi-publish.yml @@ -1,31 +1,21 @@ -name: Bump, Publish, and Release +name: Publish to PyPi on: - workflow_dispatch: - branches: - - main - inputs: - newversion: - description: "Bump Type (major minor patch)" - required: true - default: "patch" - type: choice - options: - - patch - - minor - - major - testpublish: - description: "Publish to TestPypi" - default: false - type: boolean + push: + tags: + - "v*" jobs: + lint: + uses: prosegrinder/.github/.github/workflows/poetry-lint.yaml@main + + test: + needs: lint + uses: prosegrinder/.github/.github/workflows/poetry-test.yaml@main + publish: - uses: prosegrinder/.github/.github/workflows/python-poetry-publish.yaml@main - with: - newversion: ${{ github.event.inputs.newversion }} - testpublish: ${{ 'true' == github.event.inputs.testpublish }} + needs: test + uses: prosegrinder/.github/.github/workflows/poetry-publish.yaml@main secrets: TEST_PYPI_API_TOKEN: ${{ secrets.TEST_PYPI_API_TOKEN }} PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }} - VERSION_BUMP_TAG_TOKEN: ${{ secrets.VERSION_BUMP_TAG_TOKEN }} From 4fdc9619139c618487895efd856731564b2303ee Mon Sep 17 00:00:00 2001 From: "David L. Day" Date: Mon, 19 Dec 2022 15:30:01 -0500 Subject: [PATCH 3/4] fix: explicit ci jobs --- .github/workflows/python-ci.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-ci.yml b/.github/workflows/python-ci.yml index 4649deb..7293b07 100644 --- a/.github/workflows/python-ci.yml +++ b/.github/workflows/python-ci.yml @@ -8,5 +8,15 @@ concurrency: cancel-in-progress: true jobs: - python-poetry-ci: - uses: prosegrinder/.github/.github/workflows/python-poetry-ci.yaml@main + lint: + uses: prosegrinder/.github/.github/workflows/poetry-lint.yaml@main + + test: + needs: lint + uses: prosegrinder/.github/.github/workflows/poetry-test.yaml@main + + cz-dry-run: + needs: test + uses: prosegrinder/.github/.github/workflows/poetry-cz-dry-run.yaml@main + secrets: + VERSION_BUMP_TAG_TOKEN: "${{ secrets.VERSION_BUMP_TAG_TOKEN }}" From d2d850eea717e540512e7e206b1efb14e9a43f23 Mon Sep 17 00:00:00 2001 From: "David L. Day" Date: Mon, 19 Dec 2022 15:30:10 -0500 Subject: [PATCH 4/4] fix: added commitizen config --- pyproject.toml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 68d3810..ed190cf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,13 @@ +[tool.commitizen] +version = "1.0.12" +tag_format = "v$version" +update_changelog_on_bump = true +changelog_incremental = true +bump_message = "bump: $current_version → $new_version" +version_files = [ + "pyproject.toml:version", +] + [build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api"