From 04b20a3d1962957578d4d3ce70c1ce997f97f4e3 Mon Sep 17 00:00:00 2001 From: Robert Shelton Date: Tue, 3 Feb 2026 10:47:16 -0500 Subject: [PATCH 1/2] add release.yml --- .github/workflows/release.yml | 83 +++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..ed0dcdc --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,83 @@ +name: Publish Release + +on: + release: + types: [published] + +env: + PYTHON_VERSION: "3.11" + UV_VERSION: "0.7.13" + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Check out repository + uses: actions/checkout@v6 + + - name: Install Python + uses: actions/setup-python@v6 + with: + python-version: ${{ env.PYTHON_VERSION }} + + - name: Install uv + uses: astral-sh/setup-uv@v6 + with: + version: ${{ env.UV_VERSION }} + enable-cache: true + python-version: ${{ env.PYTHON_VERSION }} # sets UV_PYTHON + cache-dependency-glob: | + pyproject.toml + uv.lock + + - name: Install dependencies + run: | + uv sync --frozen + + - name: Build package + run: uv build + + - name: Upload build + uses: actions/upload-artifact@v4 + with: + name: dist + path: dist/ + + publish: + needs: build + runs-on: ubuntu-latest + + steps: + - name: Check out repository + uses: actions/checkout@v6 + + - name: Install Python + uses: actions/setup-python@v6 + with: + python-version: ${{ env.PYTHON_VERSION }} + + - name: Install uv + uses: astral-sh/setup-uv@v6 + with: + version: ${{ env.UV_VERSION }} + enable-cache: true + python-version: ${{ env.PYTHON_VERSION }} # sets UV_PYTHON + cache-dependency-glob: | + pyproject.toml + uv.lock + + - name: Install dependencies + run: | + uv sync --frozen + + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: dist + path: dist/ + + - name: Publish to PyPI + env: + UV_PUBLISH_TOKEN: ${{ secrets.PYPI }} + run: uv publish \ No newline at end of file From 083fe6ad3d92f8714ae638fc41261763fe8dae61 Mon Sep 17 00:00:00 2001 From: Robert Shelton Date: Tue, 3 Feb 2026 10:51:21 -0500 Subject: [PATCH 2/2] update workflows --- .github/workflows/lint.yml | 8 ++++---- .github/workflows/test.yml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5700b90..1db61b4 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -22,19 +22,19 @@ jobs: steps: - name: Check out repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Install Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} - name: Install uv - uses: astral-sh/setup-uv@v4 + uses: astral-sh/setup-uv@v6 with: version: ${{ env.UV_VERSION }} enable-cache: true - python-version: ${{ matrix.python-version }} + python-version: ${{ matrix.python-version }} # sets UV_PYTHON cache-dependency-glob: | pyproject.toml uv.lock diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6e29d1c..491597d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,19 +21,19 @@ jobs: steps: - name: Check out repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Install Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} - name: Install uv - uses: astral-sh/setup-uv@v4 + uses: astral-sh/setup-uv@v6 with: version: ${{ env.UV_VERSION }} enable-cache: true - python-version: ${{ matrix.python-version }} + python-version: ${{ matrix.python-version }} # sets UV_PYTHON cache-dependency-glob: | pyproject.toml uv.lock