chore(packages): align platform package dirs
This commit is contained in:
@@ -122,7 +122,7 @@ jobs:
|
||||
env:
|
||||
VERSION: ${{ steps.validate.outputs.version }}
|
||||
run: |
|
||||
cd packages/${{ matrix.platform }}
|
||||
cd "packages/oh-my-opencode-${{ matrix.platform }}"
|
||||
jq --arg v "$VERSION" '.version = $v' package.json > tmp.json && mv tmp.json package.json
|
||||
|
||||
- name: Set root package version
|
||||
@@ -188,6 +188,7 @@ jobs:
|
||||
shell: bash
|
||||
command: |
|
||||
PLATFORM="${{ matrix.platform }}"
|
||||
PACKAGE_DIR="packages/oh-my-opencode-${PLATFORM}"
|
||||
case "$PLATFORM" in
|
||||
darwin-arm64) TARGET="bun-darwin-arm64" ;;
|
||||
darwin-x64) TARGET="bun-darwin-x64" ;;
|
||||
@@ -203,9 +204,9 @@ jobs:
|
||||
esac
|
||||
|
||||
if [[ "$PLATFORM" == windows-* ]]; then
|
||||
OUTPUT="packages/${PLATFORM}/bin/oh-my-opencode.exe"
|
||||
OUTPUT="${PACKAGE_DIR}/bin/oh-my-opencode.exe"
|
||||
else
|
||||
OUTPUT="packages/${PLATFORM}/bin/oh-my-opencode"
|
||||
OUTPUT="${PACKAGE_DIR}/bin/oh-my-opencode"
|
||||
fi
|
||||
|
||||
bun build src/cli/index.ts --compile --minify --target=$TARGET --outfile=$OUTPUT
|
||||
@@ -216,7 +217,7 @@ jobs:
|
||||
- name: Ad-hoc sign darwin binary
|
||||
if: steps.check.outputs.skip != 'true' && startsWith(matrix.platform, 'darwin-')
|
||||
run: |
|
||||
BINARY="packages/${{ matrix.platform }}/bin/oh-my-opencode"
|
||||
BINARY="packages/oh-my-opencode-${{ matrix.platform }}/bin/oh-my-opencode"
|
||||
echo "Initial state:"
|
||||
codesign -dvvv "$BINARY" 2>&1 || true
|
||||
echo "Removing any existing signature:"
|
||||
@@ -231,7 +232,8 @@ jobs:
|
||||
if: steps.check.outputs.skip != 'true'
|
||||
run: |
|
||||
PLATFORM="${{ matrix.platform }}"
|
||||
cd packages/${PLATFORM}
|
||||
PACKAGE_DIR="packages/oh-my-opencode-${PLATFORM}"
|
||||
cd "$PACKAGE_DIR"
|
||||
|
||||
if [[ "$PLATFORM" == windows-* ]]; then
|
||||
# Windows: use 7z (pre-installed on windows-latest)
|
||||
@@ -330,17 +332,18 @@ jobs:
|
||||
if: steps.check.outputs.skip_all != 'true' && steps.download.outcome == 'success'
|
||||
run: |
|
||||
PLATFORM="${{ matrix.platform }}"
|
||||
mkdir -p packages/${PLATFORM}
|
||||
PACKAGE_DIR="packages/oh-my-opencode-${PLATFORM}"
|
||||
mkdir -p "$PACKAGE_DIR"
|
||||
|
||||
if [[ "$PLATFORM" == windows-* ]]; then
|
||||
unzip binary-${PLATFORM}.zip -d packages/${PLATFORM}/
|
||||
unzip binary-${PLATFORM}.zip -d "$PACKAGE_DIR/"
|
||||
else
|
||||
tar -xzvf binary-${PLATFORM}.tar.gz -C packages/${PLATFORM}/
|
||||
tar -xzvf binary-${PLATFORM}.tar.gz -C "$PACKAGE_DIR/"
|
||||
fi
|
||||
|
||||
echo "Extracted contents:"
|
||||
ls -la packages/${PLATFORM}/
|
||||
ls -la packages/${PLATFORM}/bin/
|
||||
ls -la "$PACKAGE_DIR/"
|
||||
ls -la "$PACKAGE_DIR/bin/"
|
||||
|
||||
- uses: actions/setup-node@v6
|
||||
if: steps.check.outputs.skip_all != 'true' && steps.download.outcome == 'success'
|
||||
@@ -369,7 +372,7 @@ jobs:
|
||||
DIST_TAG: ${{ steps.validate.outputs.dist_tag }}
|
||||
NPM_CONFIG_PROVENANCE: true
|
||||
run: |
|
||||
cd packages/${{ matrix.platform }}
|
||||
cd "packages/oh-my-opencode-${{ matrix.platform }}"
|
||||
|
||||
if [ -n "$DIST_TAG" ]; then
|
||||
npm publish --access public --provenance --tag "$DIST_TAG" --loglevel verbose
|
||||
@@ -384,7 +387,7 @@ jobs:
|
||||
DIST_TAG: ${{ steps.validate.outputs.dist_tag }}
|
||||
NPM_CONFIG_PROVENANCE: true
|
||||
run: |
|
||||
cd packages/${{ matrix.platform }}
|
||||
cd "packages/oh-my-opencode-${{ matrix.platform }}"
|
||||
|
||||
# Rename package for oh-my-openagent
|
||||
jq --arg name "oh-my-openagent-${{ matrix.platform }}" \
|
||||
|
||||
@@ -222,8 +222,9 @@ jobs:
|
||||
jq --arg v "$VERSION" '.version = $v' package.json > tmp.json && mv tmp.json package.json
|
||||
|
||||
for platform in darwin-arm64 darwin-x64 darwin-x64-baseline linux-x64 linux-x64-baseline linux-arm64 linux-x64-musl linux-x64-musl-baseline linux-arm64-musl windows-x64 windows-x64-baseline; do
|
||||
jq --arg v "$VERSION" '.version = $v' "packages/${platform}/package.json" > tmp.json
|
||||
mv tmp.json "packages/${platform}/package.json"
|
||||
package_dir="packages/oh-my-opencode-${platform}"
|
||||
jq --arg v "$VERSION" '.version = $v' "${package_dir}/package.json" > tmp.json
|
||||
mv tmp.json "${package_dir}/package.json"
|
||||
done
|
||||
|
||||
jq --arg v "$VERSION" '.optionalDependencies = (.optionalDependencies | to_entries | map(.value = $v) | from_entries)' package.json > tmp.json && mv tmp.json package.json
|
||||
@@ -344,8 +345,9 @@ jobs:
|
||||
jq --arg v "$VERSION" '.version = $v' package.json > tmp.json && mv tmp.json package.json
|
||||
|
||||
for platform in darwin-arm64 darwin-x64 darwin-x64-baseline linux-x64 linux-x64-baseline linux-arm64 linux-x64-musl linux-x64-musl-baseline linux-arm64-musl windows-x64 windows-x64-baseline; do
|
||||
jq --arg v "$VERSION" '.version = $v' "packages/${platform}/package.json" > tmp.json
|
||||
mv tmp.json "packages/${platform}/package.json"
|
||||
package_dir="packages/oh-my-opencode-${platform}"
|
||||
jq --arg v "$VERSION" '.version = $v' "${package_dir}/package.json" > tmp.json
|
||||
mv tmp.json "${package_dir}/package.json"
|
||||
done
|
||||
|
||||
jq --arg v "$VERSION" '.optionalDependencies = (.optionalDependencies | to_entries | map(.value = $v) | from_entries)' package.json > tmp.json && mv tmp.json package.json
|
||||
@@ -356,7 +358,7 @@ jobs:
|
||||
run: |
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git config user.name "github-actions[bot]"
|
||||
git add package.json packages/*/package.json
|
||||
git add package.json packages/oh-my-opencode-*/package.json
|
||||
git diff --cached --quiet || git commit -m "release: v${VERSION}"
|
||||
|
||||
- name: Create release tag
|
||||
|
||||
Reference in New Issue
Block a user