Skip to content

Commit

Permalink
Merge pull request #73 from richardadonnell/1.49
Browse files Browse the repository at this point in the history
Update zip-on-pr.yml
  • Loading branch information
richardadonnell authored Nov 24, 2024
2 parents 47a32b4 + 3b2ab6c commit eec2e5b
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions .github/workflows/zip-on-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
jobs:
create-zip:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Check out code
Expand Down Expand Up @@ -53,8 +55,8 @@ jobs:
- name: Create a zip file with specific files
run: |
mkdir -p upwork-job-scraper-temp
mkdir -p releases
mkdir -p upwork-job-scraper-temp
files=(
activityLog.js
background.js
Expand All @@ -72,7 +74,7 @@ jobs:
utils.js
webhook.js
)
# Copy files to temporary directory
echo "Copying files..."
for file in "${files[@]}"; do
Expand All @@ -84,14 +86,22 @@ jobs:
exit 1
fi
done
# Create zip with the correct structure
echo "Creating zip file..."
cd upwork-job-scraper-temp
zip -r "../releases/upwork-job-scraper-${{ env.version_tag }}.zip" .
cd ..
echo "✓ Zip file created successfully in releases folder"
- name: Commit and push releases folder
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add releases/
git commit -m "Add release zip for version ${{ env.version_tag }}"
git push
- name: Upload zip file as artifact
uses: actions/upload-artifact@v3
with:
Expand Down

0 comments on commit eec2e5b

Please sign in to comment.