Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 24 additions & 30 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ name: Release
on:
push:
branches:
- main
- master
- as/uv-ci

jobs:
release:
Expand All @@ -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: |
Expand All @@ -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
Expand Down
23 changes: 19 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -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 }}
Expand Down
Loading