From 5703ec1036342ccca8682fcb1f1fd767616399ea Mon Sep 17 00:00:00 2001 From: Richard Eckart de Castilho Date: Tue, 19 Mar 2024 18:48:45 +0100 Subject: [PATCH] No issue: Prepare tag-to-release --- .github/workflows/publish_to_pypi.yml | 38 +++++++++++++++++++++++++++ Makefile | 2 +- pyproject.toml | 2 +- 3 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/publish_to_pypi.yml diff --git a/.github/workflows/publish_to_pypi.yml b/.github/workflows/publish_to_pypi.yml new file mode 100644 index 0000000..c78e9c7 --- /dev/null +++ b/.github/workflows/publish_to_pypi.yml @@ -0,0 +1,38 @@ +name: Publish to PyPi + +on: + push: + tags: + - '*' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.11' + - name: Install dependencies + run: | + pip install poetry + make dependencies +# - name: Run tests +# run: | +# pytest + - name: Build package + run: | + make build + - name: Publish package to TestPyPI + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.test_pypi_password }} + repository-url: https://test.pypi.org/legacy/ + - name: Publish package to PyPI + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.pypi_password }} diff --git a/Makefile b/Makefile index 8c99fe3..993b906 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,7 @@ docs: poetry run mkdocs serve # Building and publishing -build: unit-tests lint +build: lint # unit-tests lint poetry build publish: build diff --git a/pyproject.toml b/pyproject.toml index c7b1158..68ee765 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "inception-cli" -version = "0.1.0-dev" +version = "0.1.0" description = "INCEpTION command line tool" authors = ["The INCEpTION Project"] license = "Apache License 2.0"