Google Flights MCP, CLI and Python Library
fix(release): build publish step from the new tag, not the caller SHA (#171)
Punit Arani9ef5ec570df9
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.ymlindex e04a6fc..f64b422 100644--- a/.github/workflows/publish.yml+++ b/.github/workflows/publish.yml@@ -20,6 +20,10 @@ on:required: falsedefault: 'pypi'type: string+ ref:+ description: 'Git ref (tag/branch/SHA) to build from. Required when called from release.yml so the build picks up the bump commit, not the caller-event SHA.'+ required: false+ type: stringpermissions:contents: read@@ -29,6 +33,8 @@ permissions:jobs:test:uses: ./.github/workflows/test.yml+ with:+ ref: ${{ inputs.ref }}release-build:needs: [ test ]@@ -36,6 +42,8 @@ jobs:steps:- uses: actions/checkout@v6+ with:+ ref: ${{ inputs.ref || github.ref }}- name: Install uvuses: astral-sh/setup-uv@v7diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex 13758b8..9a875a1 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -235,6 +235,11 @@ jobs:uses: ./.github/workflows/publish.ymlwith:environment: pypi+ # Build from the new tag, not the caller-event SHA. workflow_call+ # inherits the parent's github.sha (the SHA at release-dispatch time,+ # before the bump commit lands), so without this the publish job would+ # rebuild the previous version and PyPI would reject it as duplicate.+ ref: ${{ needs.release.outputs.tag }}permissions:contents: readchecks: writediff --git a/.github/workflows/test.yml b/.github/workflows/test.ymlindex 5c381ba..6d4bdcc 100644--- a/.github/workflows/test.yml+++ b/.github/workflows/test.yml@@ -7,6 +7,11 @@ on:branches: [ main ]workflow_dispatch:workflow_call:+ inputs:+ ref:+ description: 'Git ref (tag/branch/SHA) to check out. Defaults to the caller ref.'+ required: false+ type: stringjobs:lint:@@ -18,6 +23,8 @@ jobs:steps:- uses: actions/checkout@v6+ with:+ ref: ${{ inputs.ref || github.ref }}- name: Set up Pythonuses: actions/setup-python@v6@@ -90,6 +97,8 @@ jobs:steps:- uses: actions/checkout@v6+ with:+ ref: ${{ inputs.ref || github.ref }}- name: Install uvuses: astral-sh/setup-uv@v7