Closed as not planned
Closed as not planned
Description
The problem
I cannot make releases anymore as python-semantic-release gh action docker image uses python 3.12 and my project does now support it yet.
I'm getting an error coming from poetry and semantic release docker image python version (3.12).
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
The currently activated Python version 3.12.3 is not supported by the project (>=3.8, <3.11.0).
Trying to find and use a compatible version.
Poetry was unable to find a compatible version. If you have one, you can explicitly use it via the "env use" command.
Usage: semantic-release version [OPTIONS]
Try 'semantic-release version -h' for help.
Error: Command '['bash', '-c', 'pip install poetry && poetry build']' returned non-zero exit status 1.
Expected behavior
Build and create commit + tag
Environment
Please state which OS you are using and provide the output of the following commands:
- Ubuntu
- Python 3.12
- semantic-release, version 9.8.0
- poetry
Configuration
I'm using poetry...
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.dependencies]
python = ">=3.8, <3.11.0"
With semantic release...
[tool.semantic_release]
version_variables = ["deployer/__init__.py:__version__"]
version_toml = ["pyproject.toml:tool.poetry.version"]
branch = "main"
build_command = "pip install poetry && poetry build"
commit_message = "chore(release): {version}\n\n[skip ci]\nAutomatically generated by semantic-release"
tag_format = "{version}"
In a github action...
name: CI and Release on main
on:
push:
branches:
- main
jobs:
ci:
name: CI
uses: ./.github/workflows/ci.yaml
release:
name: Release
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
needs: ci
permissions:
id-token: write
contents: write
environment:
name: pypi
url: https://pypi.org/p/vertex-deployer
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.RELEASE_ACCESS_TOKEN }}
- name: Python Semantic Release
id: python-semantic-release
uses: python-semantic-release/python-semantic-release@master
with:
github_token: ${{ secrets.RELEASE_ACCESS_TOKEN }}