From 98a225ecdac1f567687ebf09f63b82ab5e4566c5 Mon Sep 17 00:00:00 2001 From: anna-singleton-resolver Date: Tue, 10 Feb 2026 13:59:39 +0000 Subject: [PATCH 1/6] ci: build and publish pre release version to pypy --- .github/workflows/ci.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f0c26cc..060d5f6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,6 +4,8 @@ on: push: branches: - main + - feature/* + - fix/* pull_request: branches: - main @@ -111,7 +113,17 @@ jobs: echo "Setting version to: $VERSION" uv version "$VERSION" else - echo "Not building from a tag, using default version" + if [[ "$GITHUB_REF" == refs/heads/main ]]; then + echo "On main branch, using default version" + else + # we want to build pre-release versioning for other branches, but only feature/* and fix/* will get published. + BRANCH_NAME="${GITHUB_REF##*/}" + SANITIZED_BRANCH_NAME=$(echo "$BRANCH_NAME" | tr '-' '_') + SHORT_SHA=$(echo "$GITHUB_SHA" | cut -c1-7) + LAST_TAG=$(git describe --abbrev=0 --tags) + VERSION="$LAST_TAG-${SANITIZED_BRANCH_NAME}_${SHORT_SHA}" + uv version "$VERSION" + fi fi - name: Build package @@ -126,7 +138,11 @@ jobs: publish: needs: [test, build] runs-on: ubuntu-latest - if: github.event_name == 'release' && github.event.action == 'published' + if: > + (github.event_name == 'release' && github.event.action == 'published') || + (github.event_name == 'push' && ( + startsWith(github.ref, 'refs/heads/feature') || + startsWith(github.ref, 'refs/heads/fix'))) environment: name: pypi url: https://pypi.org/p/resolver-athena-client From ca521b0a757bb9dd3d34f4fb386299c2112d3dd2 Mon Sep 17 00:00:00 2001 From: anna-singleton-resolver Date: Tue, 10 Feb 2026 14:04:05 +0000 Subject: [PATCH 2/6] fix: dont shallow copy - we need tags and history for pre-releases --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 060d5f6..d19940d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -84,6 +84,8 @@ jobs: steps: - uses: actions/checkout@v6 + fetch-depth: 0 # required for guessing versioning for pre-releases + fetch-tags: true - name: Initialize submodules run: git submodule update --init --recursive From ad82d7a1407a60034c814c29becd73e016815f6e Mon Sep 17 00:00:00 2001 From: anna-singleton-resolver Date: Tue, 10 Feb 2026 14:05:11 +0000 Subject: [PATCH 3/6] fix: syntax --- .github/workflows/ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d19940d..837242c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -84,8 +84,10 @@ jobs: steps: - uses: actions/checkout@v6 - fetch-depth: 0 # required for guessing versioning for pre-releases - fetch-tags: true + with: + # required for guessing versioning for pre-releases + fetch-depth: 0 + fetch-tags: true - name: Initialize submodules run: git submodule update --init --recursive From 65c738e2e8795585936966d74ba0107bd95f501a Mon Sep 17 00:00:00 2001 From: anna-singleton-resolver Date: Tue, 10 Feb 2026 14:06:57 +0000 Subject: [PATCH 4/6] fix: semver --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 837242c..76bb7ec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -122,10 +122,10 @@ jobs: else # we want to build pre-release versioning for other branches, but only feature/* and fix/* will get published. BRANCH_NAME="${GITHUB_REF##*/}" - SANITIZED_BRANCH_NAME=$(echo "$BRANCH_NAME" | tr '-' '_') + SANITIZED_BRANCH_NAME=$(echo "$BRANCH_NAME" | tr '-' '') SHORT_SHA=$(echo "$GITHUB_SHA" | cut -c1-7) LAST_TAG=$(git describe --abbrev=0 --tags) - VERSION="$LAST_TAG-${SANITIZED_BRANCH_NAME}_${SHORT_SHA}" + VERSION="$LAST_TAG-${SANITIZED_BRANCH_NAME}.${SHORT_SHA}" uv version "$VERSION" fi fi From f82c5f2fa24ad4556b67b1bc09ca16dac6f7d2f2 Mon Sep 17 00:00:00 2001 From: anna-singleton-resolver Date: Tue, 10 Feb 2026 14:08:18 +0000 Subject: [PATCH 5/6] fix: tr syntax --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 76bb7ec..6d5689c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -122,7 +122,7 @@ jobs: else # we want to build pre-release versioning for other branches, but only feature/* and fix/* will get published. BRANCH_NAME="${GITHUB_REF##*/}" - SANITIZED_BRANCH_NAME=$(echo "$BRANCH_NAME" | tr '-' '') + SANITIZED_BRANCH_NAME=$(echo "$BRANCH_NAME" | tr -d '-') SHORT_SHA=$(echo "$GITHUB_SHA" | cut -c1-7) LAST_TAG=$(git describe --abbrev=0 --tags) VERSION="$LAST_TAG-${SANITIZED_BRANCH_NAME}.${SHORT_SHA}" From 8283e19d787504fe9d3065abadbc18b80e00041c Mon Sep 17 00:00:00 2001 From: anna-singleton-resolver Date: Tue, 10 Feb 2026 14:35:17 +0000 Subject: [PATCH 6/6] fix: python doesnt permit SemVer --- .github/workflows/ci.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6d5689c..d95e61b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -121,12 +121,9 @@ jobs: echo "On main branch, using default version" else # we want to build pre-release versioning for other branches, but only feature/* and fix/* will get published. - BRANCH_NAME="${GITHUB_REF##*/}" - SANITIZED_BRANCH_NAME=$(echo "$BRANCH_NAME" | tr -d '-') - SHORT_SHA=$(echo "$GITHUB_SHA" | cut -c1-7) LAST_TAG=$(git describe --abbrev=0 --tags) - VERSION="$LAST_TAG-${SANITIZED_BRANCH_NAME}.${SHORT_SHA}" - uv version "$VERSION" + uv version "$LAST_TAG" + uv version --bump patch --bump dev="$(date +%Y%m%d%H%M%S)" fi fi