Skip to content

armgit / fli

Public Imported from GitHub
0

Google Flights MCP, CLI and Python Library

fix(ci): stop double npm publish on bot releases (TLOG 409) (#187)

Punit Arani88d9d1ddf603
diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml
index 30ad20b..68b9b49 100644
--- a/.github/workflows/publish-npm.yml
+++ b/.github/workflows/publish-npm.yml
@@ -134,10 +134,16 @@ jobs:
runs-on: ubuntu-latest
needs:
- release-build
- # Publish on a real GitHub Release (fli-js-v* only), or when
- # workflow_call/workflow_dispatch explicitly asks for environment=npm.
+ # Publish when workflow_call / workflow_dispatch explicitly asks for
+ # environment=npm (the canonical path: release-npm.yml calls this workflow),
+ # or on a human-created GitHub Release tagged fli-js-v* (manual fallback).
+ # release-npm.yml creates its tag/Release via the bot AND publishes via the
+ # workflow_call above, so excluding github-actions[bot] here prevents the
+ # release event from triggering a SECOND, racing publish of the same version
+ # — which collides on the provenance transparency log
+ # (TLOG_CREATE_ENTRY_ERROR 409). Mirrors publish.yml (PyPI).
if: |
- (github.event_name == 'release' && startsWith(github.event.release.tag_name, 'fli-js-v'))
+ (github.event_name == 'release' && github.actor != 'github-actions[bot]' && startsWith(github.event.release.tag_name, 'fli-js-v'))
|| inputs.environment == 'npm'
permissions:
id-token: write