2 Commits

Author SHA1 Message Date
9511db8ee9 Set correct package name for Go package generation
All checks were successful
Generate and Release Protos / release (push) Successful in 26s
2026-01-08 23:15:48 +00:00
fc92331238 Try and fix AGAIN
All checks were successful
Generate and Release Protos / release (push) Successful in 26s
2026-01-08 23:06:45 +00:00
2 changed files with 16 additions and 14 deletions

View File

@@ -78,22 +78,24 @@ jobs:
ZIP_ROOT="/tmp/go_upload" ZIP_ROOT="/tmp/go_upload"
FULL_PATH="$ZIP_ROOT/$MOD_NAME@$VERSION" FULL_PATH="$ZIP_ROOT/$MOD_NAME@$VERSION"
# 1. Prepare
cd gen/go cd gen/go
go mod init $MOD_NAME
go mod tidy # 2. Initialize the module
go mod init "$MOD_NAME"
# 3. Create the structure
mkdir -p "$FULL_PATH" mkdir -p "$FULL_PATH"
cp -r . "$FULL_PATH/"
# 4. Copy the CONTENTS of models to the root of the module
pushd "$ZIP_ROOT" # This flattens the structure so the .go files are next to go.mod
# -D suppresses directory entries (fixes the "unexpected file" error) cp -r models/* "$FULL_PATH/"
# -q is quiet (optional) cp go.mod "$FULL_PATH/"
# 5. Zip and Upload
cd "$ZIP_ROOT"
zip -r -D "$GITHUB_WORKSPACE/module.zip" . zip -r -D "$GITHUB_WORKSPACE/module.zip" .
popd
# Optional: Verify zip content in logs before upload
unzip -l "$GITHUB_WORKSPACE/module.zip"
curl -f --user "owlbot:${{ secrets.PACKAGE_PUSH }}" \ curl -f --user "owlbot:${{ secrets.PACKAGE_PUSH }}" \
--upload-file "$GITHUB_WORKSPACE/module.zip" \ --upload-file "$GITHUB_WORKSPACE/module.zip" \
"${{ github.server_url }}/api/packages/owlboard/go/upload?version=$VERSION" "${{ github.server_url }}/api/packages/owlboard/go/upload?version=$VERSION"

View File

@@ -18,7 +18,7 @@ for file in $FILES; do
npx --yes json-schema-to-typescript "$file" > "gen/ts/${clean_name}.ts" npx --yes json-schema-to-typescript "$file" > "gen/ts/${clean_name}.ts"
# Generate Go # Generate Go
go-jsonschema -p models "$file" > "gen/go/models/${clean_name}.go" go-jsonschema -p backend_data_contracts "$file" > "gen/go/models/${clean_name}.go"
done done
echo "✅ Generated single TS package in gen/ts" echo "✅ Generated single TS package in gen/ts"