From c129ef900fc8fa3d8d19875efa7ce9343277f04e Mon Sep 17 00:00:00 2001 From: Obijuan Date: Fri, 14 May 2021 07:27:47 +0200 Subject: [PATCH] Github action for publishing in pypi. v0.4.2 --- .github/workflows/publish.yml | 27 +++++++++++++++++++++++++++ Makefile | 7 +++++-- icm/__init__.py | 2 +- 3 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..9270fb2 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,27 @@ +name: publish + +on: + release: + types: [created] + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: "3.8" + + - name: Install dependencies + run: | + make deps + - name: Publish to PyPi + env: + FLIT_USERNAME: ${{ secrets.PYPI_USERNAME }} + FLIT_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + make publish \ No newline at end of file diff --git a/Makefile b/Makefile index ac83d75..6a2908b 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: deps cenv env lint tox +.PHONY: deps cenv env lint tox publish deps: ## Install dependencies python -m pip install --upgrade pip @@ -16,4 +16,7 @@ lint: ## Lint and static-check python -m pylint icm tox: ## Run tox - python -m tox \ No newline at end of file + python -m tox + +publish: ## Publish to PyPi + python -m flit publish \ No newline at end of file diff --git a/icm/__init__.py b/icm/__init__.py index 4cbd24f..f350bba 100644 --- a/icm/__init__.py +++ b/icm/__init__.py @@ -5,7 +5,7 @@ # -- Author Jesús Arroyo # -- Licence GPLv2 -VERSION = (0, 4, 1) +VERSION = (0, 4, 2) __version__ = ".".join([str(s) for s in VERSION]) __title__ = "icm"