Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions .github/workflows/release-node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,35 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
set -euo pipefail
VERSION=$(node -p "require('./package.json').version")
# Derive the npm dist-tag from the SemVer pre-release identifier.
# 0.0.1-alpha.1 β†’ --tag alpha, 0.0.1-rc.1 β†’ --tag rc, 0.0.1 β†’ (empty, defaults to @latest)
if [[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+-([a-zA-Z]+) ]]; then
DIST_TAG="--tag ${BASH_REMATCH[1]}"
else
DIST_TAG=""
fi
echo "Publishing runtime sub-packages at version=$VERSION dist-tag arg='$DIST_TAG'"
for pkg in runtime-linux-x64 runtime-linux-arm64 runtime-darwin-x64 runtime-darwin-arm64; do
echo "::group::publish @agent-assembly/${pkg}"
pnpm publish --access public --no-git-checks "packages/${pkg}"
# shellcheck disable=SC2086
pnpm publish --access public --no-git-checks $DIST_TAG "packages/${pkg}"
echo "::endgroup::"
done

- name: Publish main @agent-assembly/sdk
env:
NPM_CONFIG_PROVENANCE: "true"
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpm publish --access public --no-git-checks
run: |
VERSION=$(node -p "require('./package.json').version")
# Derive the npm dist-tag from the SemVer pre-release identifier.
# 0.0.1-alpha.1 β†’ --tag alpha, 0.0.1-rc.1 β†’ --tag rc, 0.0.1 β†’ (empty, defaults to @latest)
if [[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+-([a-zA-Z]+) ]]; then
DIST_TAG="--tag ${BASH_REMATCH[1]}"
else
DIST_TAG=""
fi
echo "Publishing main SDK at version=$VERSION dist-tag arg='$DIST_TAG'"
# shellcheck disable=SC2086
pnpm publish --access public --no-git-checks $DIST_TAG
13 changes: 12 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,17 @@ jobs:
run: pnpm build

- name: Publish package
run: pnpm publish --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
VERSION=$(node -p "require('./package.json').version")
# Derive the npm dist-tag from the SemVer pre-release identifier.
# 0.0.1-alpha.1 β†’ --tag alpha, 0.0.1-rc.1 β†’ --tag rc, 0.0.1 β†’ (empty, defaults to @latest)
if [[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+-([a-zA-Z]+) ]]; then
DIST_TAG="--tag ${BASH_REMATCH[1]}"
else
DIST_TAG=""
fi
echo "Publishing version=$VERSION with dist-tag arg='$DIST_TAG'"
# shellcheck disable=SC2086
pnpm publish --no-git-checks $DIST_TAG
Loading