Skip to content

The open-source agent harness - the runtime layer that turns an LLM into a working agent.

Fix npm publish with tag (#48)

Chirag Jain43b5dd87bc36
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 146e681b0..a37a53019 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -41,8 +41,18 @@ jobs:
# Publish from the staged dist/: dist/package.json is
# generated by the build with dist-relative paths, so the tarball root is
# the compiled file tree and deep imports have no dist/ segment.
- - name: Publish
+ - name: Publish @truefoundry/utils-core
working-directory: packages/harness/dist
- run: npm publish --access public
+ run: |
+ VERSION="$(node -p "require('./package.json').version")"
+ if [[ "$VERSION" == *-* ]]; then
+ TAG="${VERSION#*-}"
+ TAG="${TAG%%.*}"
+ echo "Publishing $VERSION with --tag $TAG"
+ npm publish --access public --tag "$TAG"
+ else
+ echo "Publishing $VERSION (latest)"
+ npm publish --access public
+ fi
# TODO(oss): add --provenance once the repo is public. Do NOT add it now:
# provenance publicly attests the source repo and commit.