Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

patch: workflow-updates #34

Merged
merged 4 commits into from Dec 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
36 changes: 13 additions & 23 deletions .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 }}
14 changes: 12 additions & 2 deletions .github/workflows/python-ci.yml
Expand Up @@ -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 }}"
14 changes: 14 additions & 0 deletions .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 }}"
10 changes: 10 additions & 0 deletions 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"
Expand Down