add dist into action

This commit is contained in:
Nilton Constantino
2026-01-19 09:15:59 +00:00
parent 6eb78d9ca5
commit 3726dc989b
7 changed files with 36 additions and 11 deletions
+1 -7
View File
@@ -2,10 +2,4 @@
# Get version from git tag or fallback to Cargo.toml version
VERSION=$(git describe --tags --abbrev=0 2>/dev/null || grep -m 1 '^version =' crates/prometeu-runtime-desktop/Cargo.toml | cut -d '"' -f 2 || echo "0.1.0")
echo "$VERSION" > VERSION.txt
echo "Generated VERSION.txt with version $VERSION"
# Prepare staging for SDK extra files
echo "Preparing dist-staging..."
rm -rf dist-staging
mkdir -p dist-staging/devtools-protocol
cp devtools-protocol/protocol.json dist-staging/devtools-protocol/
echo "Generated VERSION.txt with version $VERSION"
+25
View File
@@ -0,0 +1,25 @@
#!/bin/bash
./scripts/gen-version.sh
VERSION=$(cat VERSION.txt)
# Prepare staging for SDK extra files
echo "Preparing dist-staging..."
mkdir -p dist-staging/devtools-protocol
cp devtools-protocol/protocol.json dist-staging/devtools-protocol/
# Clean and prepare the version-specific directory
echo "Cleaning dist-staging/stable/$VERSION..."
rm -rf "dist-staging/stable/$VERSION"
mkdir -p "dist-staging/stable/$VERSION"
# Build stable using cargo build
dist build
echo "Copying target/distrib content to dist-staging/stable/$VERSION..."
if [ -d "target/distrib" ] && [ "$(ls -A target/distrib)" ]; then
cp -r target/distrib/* "dist-staging/stable/$VERSION/"
else
echo "Warning: target/dist directory not found or empty."
fi