From 5b56ac17fcbb1ac631836ce0d342891e8fbf8223 Mon Sep 17 00:00:00 2001 From: "Nahuel (CT)" Date: Tue, 31 Mar 2026 12:56:25 +0300 Subject: [PATCH 1/3] feat: Streamline completion config loading --- tests/examples/completion_config/tasks.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/examples/completion_config/tasks.py b/tests/examples/completion_config/tasks.py index fb12c09..c17f5cb 100644 --- a/tests/examples/completion_config/tasks.py +++ b/tests/examples/completion_config/tasks.py @@ -24,10 +24,6 @@ - Users can customize available options via config files - Same config values can be used by both tasks and completions - Supports user (~/.invoke.yaml), system (/etc/invoke.yaml), and project config - -Note: The completion callbacks receive a ToolkitContext with ToolkitConfig, -which has access to the default config values. For project-specific config, -you can use the @cached decorator to load config once and cache results. """ from typing import Annotated @@ -203,7 +199,7 @@ def show_config(ctx: Context) -> None: # Show database config ctx.print("\n[cyan]Database instances:[/cyan]") - instances = ctx.get_config_value("database.instances", default=[]) + instances = ctx.get_g_config_value("database.instances", default=[]) for instance in instances: ctx.print(f" - {instance}") From 463ab510914548da1b6f5bd14a3038f67121b638 Mon Sep 17 00:00:00 2001 From: "Nahuel (CT)" Date: Tue, 31 Mar 2026 13:05:28 +0300 Subject: [PATCH 2/3] feat: Add workflow to publish prereleases --- .github/workflows/publish-prereleases.yaml | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/publish-prereleases.yaml diff --git a/.github/workflows/publish-prereleases.yaml b/.github/workflows/publish-prereleases.yaml new file mode 100644 index 0000000..e16b880 --- /dev/null +++ b/.github/workflows/publish-prereleases.yaml @@ -0,0 +1,35 @@ +name: Publish Prerelease + +on: + release: + types: [prereleased] + +jobs: + publish: + runs-on: ubuntu-latest + environment: release + permissions: + id-token: write + if: github.event.release.prerelease == true + + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.event.release.tag_name }} + fetch-depth: 0 + + - name: Install uv + uses: astral-sh/setup-uv@v3 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.13" + + - name: Build package + run: uvx --with uv-dynamic-versioning hatchling build -d ./dist/ + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + attestations: true From f751f8870312ce294616ccfcfa68ed779e9889f5 Mon Sep 17 00:00:00 2001 From: "Nahuel (CT)" Date: Tue, 31 Mar 2026 13:05:47 +0300 Subject: [PATCH 3/3] fix: Ensure publish-releases workflow only handles official releases --- .github/workflows/publish-releases.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish-releases.yaml b/.github/workflows/publish-releases.yaml index 955fa6b..c6f3a3d 100644 --- a/.github/workflows/publish-releases.yaml +++ b/.github/workflows/publish-releases.yaml @@ -33,6 +33,7 @@ jobs: environment: release permissions: id-token: write + if: github.event.release.prerelease == false steps: - uses: actions/checkout@v4