diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1d5e12c..2fc3033 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -43,14 +43,18 @@ jobs: ref: ${{ github.ref }} fetch-depth: 0 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install '.[release]' + - name: Bump Version id: bump_version env: BUMP_TYPE: ${{ github.event.inputs.bump_type }} run: | - python -m pip install semvergit echo "Bumping type: ${{ env.BUMP_TYPE }}" - new_version=$(semvergit -t ${{ env.BUMP_TYPE }} -v) + new_version=$(python -m semvergit -t ${{ env.BUMP_TYPE }} -v) echo "new_version=$new_version" >> $GITHUB_OUTPUT - name: Create Github Release @@ -67,7 +71,7 @@ jobs: - name: Build Package if: ${{ github.event.inputs.publish == 'true' }} run: | - make build + python -m build - name: Publish To PyPI if: ${{ github.event.inputs.publish == 'true' }} @@ -75,4 +79,4 @@ jobs: TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} TWINE_USERNAME: ${{ secrets.PYPI_API_USER }} run: | - make publish + python -m twine upload dist/* diff --git a/Makefile b/Makefile index 289ac82..1bb9783 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ run: python3 xls_updater/app.py setup: - python3 -m pip install --editable '.[dev,test]' + python3 -m pip install '.[dev, test, release]' setup-dev: python3 -m pip install --editable '.[dev]' @@ -14,6 +14,9 @@ setup-dev: setup-test: python3 -m pip install --editable '.[test]' +setup-relase: + python3 -m pip install --editable '.[release]' + pip-clean: python3 -m pip uninstall -y -r <(pip freeze) @@ -51,11 +54,3 @@ compile: python3 -m pip install --upgrade pip-tools python3 -m piptools compile -o requirements-dev.txt --extra dev pyproject.toml python3 -m piptools compile -o requirements-test.txt --extra test pyproject.toml - -build: - python3 -m pip install --upgrade build - python3 -m build - -publish: - python3 -m pip install --upgrade twine - python3 -m twine upload dist/* diff --git a/pyproject.toml b/pyproject.toml index e4e790f..883afce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,6 +48,11 @@ test = [ "pytest-cov", "pytest_mock", ] +release = [ + "semvergit", + "build", + "twine", +] [project.scripts] xls-updater = "xls_updater.cli:cli"