Skip to content

Commit cd30bb0

Browse files
authored
chore(publish): strip iocraft download/publish pipeline (#1294)
The @socketaddon/iocraft* packages now publish from a dedicated repo (SocketDev/socket-addon). socket-cli's role narrows to *consuming* @socketaddon/iocraft as a runtime dep — it no longer downloads .node binaries from socket-btm or republishes them to npm. Removed: - scripts/download-iocraft-binaries.mts - packages/package-builder/scripts/publish-socketaddon-placeholders.mts - packages/package-builder/scripts/PUBLISHING-PLACEHOLDERS.md - packages/package-builder/test-iocraft-package.mts Edited .github/workflows/provenance.yml: - removed the 'iocraft' workflow_dispatch input - removed the iocraft version/tag computation in the 'Get versions' step - removed the four iocraft steps (Download binaries, Copy binaries, Publish main, Publish platform packages) - removed the iocraft branches in the Summary step Net change: 1088 lines deleted, 1 added. Dev plumbing (templates/socketaddon-{main,package}/, generate-socketaddon- packages.mts, setup-iocraft-dev.mts, the cli/package.json `file:` link to the dev build dir, the CI shim heredocs in ci.yml, the iocraft test exclusion list in vitest.config.mts) is intentionally untouched — socket-cli still needs @socketaddon/iocraft installable at install time for tests + dev. The follow-up commit replaces the `file:` link with a registry version once SocketDev/socket-addon publishes a real version. Pre-commit tests skipped (DISABLE_PRECOMMIT_TEST=1) — the iocraft renderer tests require a real native iocraft.node which this worktree doesn't have. CI excludes those same tests via vitest.config.mts.
1 parent d84957a commit cd30bb0

5 files changed

Lines changed: 1 addition & 1088 deletions

File tree

.github/workflows/provenance.yml

Lines changed: 1 addition & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ on:
2323
description: 'socket (+ 8 bins)'
2424
type: boolean
2525
default: true
26-
iocraft:
27-
description: '@socketaddon/iocraft (+ 8 platforms)'
28-
type: boolean
29-
default: false
3026

3127
permissions:
3228
contents: read
@@ -155,12 +151,7 @@ jobs:
155151
echo "cli_version=$CLI_VERSION" >> $GITHUB_OUTPUT
156152
echo "Socket CLI version: $CLI_VERSION"
157153
158-
# iocraft ecosystem version (independent)
159-
IOCRAFT_VERSION=$(node -p "require('./packages/package-builder/templates/socketaddon-main/package.json').version")
160-
echo "iocraft_version=$IOCRAFT_VERSION" >> $GITHUB_OUTPUT
161-
echo "iocraft version: $IOCRAFT_VERSION"
162-
163-
# Determine npm dist-tags based on versions
154+
# Determine npm dist-tags based on version
164155
if [[ "$CLI_VERSION" =~ -pre\. ]]; then
165156
CLI_TAG="pre"
166157
else
@@ -169,14 +160,6 @@ jobs:
169160
echo "cli_tag=$CLI_TAG" >> $GITHUB_OUTPUT
170161
echo "Socket CLI dist-tag: $CLI_TAG"
171162
172-
if [[ "$IOCRAFT_VERSION" =~ -pre\. ]]; then
173-
IOCRAFT_TAG="pre"
174-
else
175-
IOCRAFT_TAG="latest"
176-
fi
177-
echo "iocraft_tag=$IOCRAFT_TAG" >> $GITHUB_OUTPUT
178-
echo "iocraft dist-tag: $IOCRAFT_TAG"
179-
180163
# Download and publish binary packages.
181164
- name: Download binaries
182165
if: ${{ inputs.socket }}
@@ -280,79 +263,6 @@ jobs:
280263
cd "$PKG_DIR"
281264
npm publish --provenance --access public --no-git-checks --tag "$TAG"
282265
283-
# Download iocraft binaries from socket-btm.
284-
- name: Download iocraft binaries
285-
if: ${{ inputs.iocraft }}
286-
run: |
287-
echo "Downloading iocraft .node binaries for all platforms..."
288-
node scripts/download-iocraft-binaries.mts
289-
290-
# Copy iocraft binaries to package directories.
291-
- name: Copy iocraft binaries to packages
292-
if: ${{ inputs.iocraft }}
293-
shell: bash
294-
run: |
295-
set -euo pipefail
296-
297-
# Get platform targets from single source of truth.
298-
PLATFORMS_STR=$(node scripts/get-platform-targets.mts)
299-
read -ra PLATFORMS <<< "$PLATFORMS_STR"
300-
301-
for target in "${PLATFORMS[@]}"; do
302-
echo "Copying iocraft.node for ${target}..."
303-
304-
# Source path (downloaded binary).
305-
SRC_PATH="packages/build-infra/build/downloaded/iocraft/${target}/iocraft.node"
306-
307-
# Destination path (package directory).
308-
PKG_DIR="packages/package-builder/build/prod/out/socketaddon-iocraft-${target}"
309-
mkdir -p "$PKG_DIR"
310-
cp "$SRC_PATH" "$PKG_DIR/iocraft.node"
311-
312-
echo "Copied to ${PKG_DIR}/iocraft.node"
313-
done
314-
315-
# Publish @socketaddon/iocraft packages (main + platform-specific).
316-
- name: Publish @socketaddon/iocraft main package
317-
if: ${{ inputs.iocraft && !inputs.dry-run }}
318-
env:
319-
VERSION: ${{ steps.version.outputs.iocraft_version }}
320-
TAG: ${{ steps.version.outputs.iocraft_tag }}
321-
run: |
322-
PKG_DIR="packages/package-builder/build/prod/out/socketaddon-iocraft"
323-
node scripts/prepare-package-for-publish.mts "$PKG_DIR" "$VERSION"
324-
cd "$PKG_DIR"
325-
npm publish --provenance --access public --no-git-checks --tag "$TAG"
326-
327-
- name: Publish @socketaddon/iocraft platform packages
328-
if: ${{ inputs.iocraft && !inputs.dry-run }}
329-
shell: bash
330-
env:
331-
VERSION: ${{ steps.version.outputs.iocraft_version }}
332-
TAG: ${{ steps.version.outputs.iocraft_tag }}
333-
run: |
334-
set -euo pipefail
335-
336-
# Get platform targets from single source of truth.
337-
PLATFORMS_STR=$(node scripts/get-platform-targets.mts)
338-
read -ra PLATFORMS <<< "$PLATFORMS_STR"
339-
340-
for target in "${PLATFORMS[@]}"; do
341-
echo "::group::Publishing @socketaddon/iocraft-${target}"
342-
343-
PKG_DIR="packages/package-builder/build/prod/out/socketaddon-iocraft-${target}"
344-
345-
# Prepare package.
346-
node scripts/prepare-package-for-publish.mts "$PKG_DIR" "$VERSION"
347-
348-
# Publish.
349-
cd "$PKG_DIR"
350-
npm publish --provenance --access public --no-git-checks --tag "$TAG"
351-
cd -
352-
353-
echo "::endgroup::"
354-
done
355-
356266
- name: Summary
357267
# zizmor: ignore[template-injection]
358268
run: |
@@ -361,9 +271,6 @@ jobs:
361271
if [ "${{ inputs.socket }}" = "true" ] || [ "${{ inputs.cli }}" = "true" ] || [ "${{ inputs.cli-sentry }}" = "true" ]; then
362272
echo "Socket CLI version: \`${{ steps.version.outputs.cli_version }}\` (tag: \`${{ steps.version.outputs.cli_tag }}\`)" >> $GITHUB_STEP_SUMMARY
363273
fi
364-
if [ "${{ inputs.iocraft }}" = "true" ]; then
365-
echo "iocraft version: \`${{ steps.version.outputs.iocraft_version }}\` (tag: \`${{ steps.version.outputs.iocraft_tag }}\`)" >> $GITHUB_STEP_SUMMARY
366-
fi
367274
echo "" >> $GITHUB_STEP_SUMMARY
368275
if [ "${{ inputs.dry-run }}" = "true" ]; then
369276
echo "**Dry run - nothing was published**" >> $GITHUB_STEP_SUMMARY
@@ -381,8 +288,4 @@ jobs:
381288
if [ "${{ inputs.cli-sentry }}" = "true" ]; then
382289
echo "- @socketsecurity/cli-with-sentry" >> $GITHUB_STEP_SUMMARY
383290
fi
384-
if [ "${{ inputs.iocraft }}" = "true" ]; then
385-
echo "- @socketaddon/iocraft (main)" >> $GITHUB_STEP_SUMMARY
386-
echo "- @socketaddon/iocraft-* (8 platforms)" >> $GITHUB_STEP_SUMMARY
387-
fi
388291
fi

packages/package-builder/scripts/PUBLISHING-PLACEHOLDERS.md

Lines changed: 0 additions & 139 deletions
This file was deleted.

0 commit comments

Comments
 (0)