Skip to content

Commit

Permalink
update download URL
Browse files Browse the repository at this point in the history
  • Loading branch information
1311-hack1 committed Dec 27, 2024
1 parent 514fe40 commit 36a65e1
Showing 1 changed file with 29 additions and 11 deletions.
40 changes: 29 additions & 11 deletions .github/workflows/create-extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
mkdir -p temp
cd temp
# Get extension name for directory
# Get extension name and create safe name
EXTENSION_NAME="${{ fromJSON(steps.parse.outputs.result).name }}"
if [ -z "$EXTENSION_NAME" ]; then
echo "Extension name not found in issue"
Expand All @@ -89,7 +89,12 @@ jobs:
# Generate safe name for directory
SAFE_NAME=$(echo "$EXTENSION_NAME" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-zA-Z0-9-]/-/g')
echo "Creating extension directory: $SAFE_NAME"
echo "Extension name: $EXTENSION_NAME"
echo "Safe name for directory: $SAFE_NAME"
# Create extension directory early
mkdir -p "../extensions/${SAFE_NAME}"
echo "Created directory: ../extensions/${SAFE_NAME}"
# Download and extract ZIP
ZIP_URL="${{ fromJSON(steps.parse.outputs.result).zip_url }}"
Expand Down Expand Up @@ -145,10 +150,17 @@ jobs:
echo "Current directory contents:"
ls -la
echo "Parent directory contents:"
ls -la ..
echo "Extensions directory contents:"
ls -la ../extensions/
if [ -d "artifact" ]; then
cd artifact
echo "Entered artifact directory. Contents:"
# Find extracted directory (could be any name)
EXTRACTED_DIR=$(find . -type d -mindepth 1 -maxdepth 1 | head -n 1)
if [ -n "$EXTRACTED_DIR" ]; then
cd "$EXTRACTED_DIR"
echo "Entered extracted directory: $EXTRACTED_DIR"
echo "Contents:"
ls -la
fi
Expand All @@ -174,15 +186,21 @@ jobs:
exit 1
fi
# Create directory with extension name
mkdir -p "../../extensions/${SAFE_NAME}"
echo "Found files:"
echo "CRX: $CRX_FILE"
echo "Icon: $ICON_FILE"
# Copy files to final location
echo "Copying files to: ../extensions/${SAFE_NAME}/"
cp "$CRX_FILE" "../extensions/${SAFE_NAME}/${SAFE_NAME}.crx"
cp "$ICON_FILE" "../extensions/${SAFE_NAME}/icon.png"
# Move files to final location
cp "$CRX_FILE" "../../extensions/${SAFE_NAME}/${SAFE_NAME}.crx"
cp "$ICON_FILE" "../../extensions/${SAFE_NAME}/icon.png"
# Verify files were copied
echo "Final extension directory contents:"
ls -la "../extensions/${SAFE_NAME}/"
# Clean up
cd ../..
cd ..
rm -rf temp
- name: Update Extensions JSON
Expand Down

0 comments on commit 36a65e1

Please sign in to comment.