Skip to content

Commit

Permalink
chore: reseted version to 0.0.0, and switched to python-semantic-release
Browse files Browse the repository at this point in the history
  • Loading branch information
Guibod committed Feb 5, 2023
1 parent dbcb11f commit e381eca
Show file tree
Hide file tree
Showing 7 changed files with 513 additions and 42 deletions.
31 changes: 0 additions & 31 deletions .github/workflows/python-publish.yml

This file was deleted.

23 changes: 23 additions & 0 deletions .github/workflows/python-semver.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Semantic Release

on:
push:
branches:
- master

jobs:
release:
runs-on: ubuntu-latest
concurrency: release

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Python Semantic Release
uses: relekang/python-semantic-release@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
repository_username: __token__
repository_password: ${{ secrets.PYPI_TOKEN }}
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,8 @@ test: hidden ## run pytest with coverage
build: install lint test ## run `poetry build` to build source distribution and wheel
poetry build

bumpversion: build ## bumpversion
poetry run bump2version --tag --current-version $$(git describe --tags --abbrev=0) --tag-name '{new_version}' patch
git push
git push --tags
pyinstaller: install lint test ## Create a binary executable using pyinstaller
poetry run pyinstaller src/mightstone/cli.py --onefile --name mightstone

run: ## run `poetry run mightstone`
poetry run mightstone
4 changes: 1 addition & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@
project = "mightstone"
copyright = "2022, Guillaume Boddaert"
author = "Guillaume Boddaert"
with open("../../pyproject.toml") as f:
release = toml.load(f)["tool"]["poetry"]["version"]
version = release
version = "0.0.0"

# -- General configuration ---------------------------------------------------

Expand Down
481 changes: 480 additions & 1 deletion poetry.lock

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "mightstone"
version = "0.0.1"
version = "0.0.0"
description = "A library manage all things Magic The Gathering related in python"
authors = ["Guillaume Boddaert <@gboddaert>"]
# Use identifier from https://spdx.org/licenses/
Expand Down Expand Up @@ -57,7 +57,7 @@ pylint-pydantic = "^0.1.6"
sphinx = "^5.0.0"
autodoc-pydantic = "^1.8.0"
toml = "^0.10.2"
bump2version = "^1.0.1"
python-semantic-release = "^7.33.1"

[build-system]
requires = ["poetry_core>=1.0.0"]
Expand Down Expand Up @@ -86,3 +86,8 @@ filterwarnings = [
"ignore::DeprecationWarning:moto.*:",
"ignore::DeprecationWarning:boto.*:",
]

[tool.semantic_release]
version_variable = "src/mightstone/__init__.py:__version__,docs/source/conf.py:version"
version_toml = "pyproject.toml:tool.poetry.version"
branch = "main"
2 changes: 1 addition & 1 deletion src/mightstone/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
Place holder documentation
"""

__version__ = "0.0.2"
__version__ = "0.0.0"
__author__ = "Guillaume Boddaert"

0 comments on commit e381eca

Please sign in to comment.