diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 953b0b4..fc0106a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,8 +3,7 @@ name: Release on: push: branches: - - main - - master + - as/uv-ci jobs: release: @@ -19,18 +18,14 @@ jobs: - name: Set up Python uses: actions/setup-python@v5.6.0 with: - python-version: "3.11" - - - name: Upgrade pip - run: | - pip install --constraint=.github/workflows/constraints.txt pip - pip --version - - - name: Install Poetry - run: | - pip install --constraint=.github/workflows/constraints.txt poetry - poetry --version + python-version: "3.13" + - name: Install uv + uses: astral-sh/setup-uv@v6 + with: + version: "0.8.8" + enable-cache: true + - name: Check if there is a parent commit id: check-parent-commit run: | @@ -42,33 +37,32 @@ jobs: uses: salsify/action-detect-and-tag-new-version@v2.0.3 with: version-command: | - bash -o pipefail -c "poetry version | awk '{ print \$2 }'" + bash -o pipefail -c "uv version | awk '{ print \$2 }'" - name: Bump version for developmental release if: "! steps.check-version.outputs.tag" run: | - poetry version patch && - version=$(poetry version | awk '{ print $2 }') && - poetry version $version.dev.$(date +%s) + echo "no outputs tag" + uv version --bump patch && + version=$(uv version | awk '{ print $2 }') && + uv version $version.dev.$(date +%s) + uv version - name: Build package run: | - poetry build --ansi + uv build - - name: Publish package on PyPI - if: steps.check-version.outputs.tag - uses: pypa/gh-action-pypi-publish@v1.12.2 - with: - user: __token__ - password: ${{ secrets.PYPI_TOKEN }} + - name: Publish package Publish package on **PyPI** + if: "steps.check-version.outputs.tag" + run: uv publish + env: + UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }} - - name: Publish package on TestPyPI + - name: Publish package Publish package on **TestPyPI** if: "! steps.check-version.outputs.tag" - uses: pypa/gh-action-pypi-publish@v1.12.2 - with: - user: __token__ - password: ${{ secrets.TEST_PYPI_TOKEN }} - repository_url: https://test.pypi.org/legacy/ + run: uv publish --publish-url https://test.pypi.org/legacy/ + env: + UV_PUBLISH_TOKEN: ${{ secrets.TEST_PYPI_TOKEN }} - name: Publish the release notes uses: release-drafter/release-drafter@v6.0.0 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ffc0749..bfd110c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,9 +1,24 @@ name: Tests -on: - - push - - pull_request - +on: + workflow_dispatch: + inputs: + logLevel: + description: 'Log level' + required: true + default: 'warning' + type: choice + options: + - info + - debug + print_tags: + description: 'True to print to STDOUT' + required: true + type: boolean + tags: + description: 'Test scenario tags' + required: true + type: string jobs: tests: name: ${{ matrix.session }} ${{ matrix.python }} / ${{ matrix.os }}