Skip to content

Commit

Permalink
Update releasing system
Browse files Browse the repository at this point in the history
  • Loading branch information
bswck committed Aug 22, 2023
1 parent f982d2b commit 40a5fde
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 23 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,8 @@ jobs:
- name: Install poetry
run: |
pipx install poetry
pipx inject poetry-bumpversion
- name: Build with poetry
run: |
export TAG_PREFIX="v"
export TAG_NAME=${{ github.ref_name }}
poetry version $(echo ${TAG_NAME#$TAG_PREFIX})
poetry build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# configzen `v0.8.1`
# configzen `v0.8.2`

_configzen_ – easily create and maintain complex, statically-typed configurations with validation in Python.

Expand Down
2 changes: 1 addition & 1 deletion configzen/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
__author__ = "bswck"
__copyright__ = "Copyright 2023–present, bswck"
__credits__ = ["Lunarmagpie", "trag1c"]
__version__ = "0.8.1"
__version__ = "0.8.2"

__all__ = (
*model.__all__,
Expand Down
36 changes: 20 additions & 16 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,21 +70,6 @@ def release(session: nox.Session) -> None:
session.run("poetry", "version", "--short", silent=True, external=True),
).strip()
)
session.log(f"Creating {new_version} tag...")
try:
session.run(
"git",
"tag",
"-a",
new_version,
"-m",
f"Release {new_version}",
external=True,
)
except CommandFailed:
session.log(f"Failed to create {new_version} tag, probably already exists.")
session.log("Pushing local tags...")
session.run("git", "push", "--tags", external=True)

session.run("git", "diff", external=True)
commit_confirm = (
Expand All @@ -109,4 +94,23 @@ def release(session: nox.Session) -> None:
)
session.run("git", "push", external=True)
else:
session.log("Ok, changed uncommitted.")
session.error(
"Changes made uncommitted. Commit your unrelated changes and try again.",
)

session.log(f"Creating {new_version} tag...")
try:
session.run(
"git",
"tag",
"-a",
new_version,
"-m",
f"Release `{new_version}`",
external=True,
)
except CommandFailed:
session.log(f"Failed to create {new_version} tag, probably already exists.")
else:
session.log("Pushing local tags...")
session.run("git", "push", "--tags", external=True)
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "configzen"
version = "0.8.1"
version = "0.8.2"
description = "The easiest way to manage configuration files in Python"
authors = ["bswck <bswck.dev@gmail.com>"]
license = "MIT"
Expand Down

0 comments on commit 40a5fde

Please sign in to comment.