fix(ci): enable package publish on tags#5
Conversation
Greptile SummaryThis PR wires up package publishing by adding a
Confidence Score: 3/5The PR's core goal — publishing on tag pushes — may not work because One P1 finding: the .github/workflows/ci.yml — specifically lines 38-39 ( Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[GitHub Event] --> B{Event type?}
B -->|push to main| C[dry_run = true\nskip publish]
B -->|push to v* tag| D{publish_on_tag\nin reusable wf?}
B -->|pull_request| E[dry_run = true\nskip publish]
B -->|workflow_dispatch| F{inputs.publish\n== true?}
F -->|yes| G[dry_run = false\npublish package]
F -->|no| H[dry_run = true\nskip publish]
D -->|overrides dry_run| I[publish package ✅]
D -->|dry_run wins| J[dry_run = true\nsilent dry-run ⚠️]
Reviews (1): Last reviewed commit: "fix(ci): enable package publish on tags" | Re-trigger Greptile |
| npm_access: public | ||
| github_package_name: "@tummycrypt/tinyland-security" |
There was a problem hiding this comment.
dry_run is always true on tag pushes
The expression !(github.event_name == 'workflow_dispatch' && inputs.publish == true) evaluates to true on every push event (including v* tag pushes), so the reusable workflow receives both dry_run: true and publish_on_tag: true simultaneously on a tag trigger. Whether a publish actually occurs depends entirely on whether the reusable workflow at 53f0326 lets publish_on_tag override a caller-supplied dry_run: true — that contract isn't visible here. If dry_run takes precedence, tags will silently produce a dry run instead of a real publish, negating the purpose of this PR.
To make the intent explicit and remove the ambiguity, include the tag-push case in the dry_run expression:
| npm_access: public | |
| github_package_name: "@tummycrypt/tinyland-security" | |
| dry_run: ${{ !(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')) && !(github.event_name == 'workflow_dispatch' && inputs.publish == true) }} | |
| publish_on_tag: true |
Summary
Refs TIN-713.
Validation