diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6aec0b1..1539644 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,13 +22,13 @@ jobs: - name: Install dependencies run: | - python -m pip install poetry --upgrade pip + python -m pip install --upgrade pip + python -m pip install poetry + poetry config virtualenvs.create false + poetry lock --no-update poetry install - name: Python Semantic Release uses: python-semantic-release/python-semantic-release@master - env: + with: github_token: ${{ secrets.GITHUB_TOKEN }} - PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }} - PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: poetry run semantic-release publish --post publish_command='poetry publish --repository testpypi' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 99be1c9..96b9813 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: Run Tests with Tox +name: Run Tests on: push: @@ -33,7 +33,7 @@ jobs: python -m pip install --upgrade pip python -m pip install poetry poetry config virtualenvs.create false - poetry lock + poetry lock --no-update poetry install - name: Unit tests diff --git a/pyproject.toml b/pyproject.toml index 52f17eb..82a2f3f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,10 +59,15 @@ build-backend = "poetry.core.masonry.api" line-length = 88 [tool.semantic_release] -branch = "main" +branch = "ci/setup-semantic-release" version_variable = [ "maidr/__init__.py:__version__" ] upload_to_PyPI = true upload_to_release = true build_command = "pip install poetry && poetry build" + +[tool.semantic_release.branches."ci/setup-semantic-release"] +match = "ci/setup-semantic-release" +prerelease = true +prerelease_token = "rc"