-
-
Notifications
You must be signed in to change notification settings - Fork 2
60 lines (51 loc) · 1.54 KB
/
main.yml
File metadata and controls
60 lines (51 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Build Acode Plugin
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
- name: Install dependencies
run: npm install
- name: Run build script
run: npm run build
# ---------- Debug / Verify artifacts ----------
- name: Show workspace and find any zip files (debug)
run: |
echo "PWD: $(pwd)"
echo "List top-level files:"
ls -la
echo "Find any zip files (full list):"
find . -type f -name "*.zip" -print || true
# ---------- Collect zip into single predictable folder ----------
- name: Collect ZIP artifact(s)
run: |
mkdir -p .artifacts
# find first zip and copy it (copy all zips if you prefer)
FOUND=0
while IFS= read -r file; do
echo "Copying zip: $file"
cp "$file" .artifacts/ || true
FOUND=1
done < <(find . -type f -name "*.zip" -print)
if [ "$FOUND" -eq 0 ]; then
echo "No zip files found to copy."
fi
echo "Contents of .artifacts:"
ls -la .artifacts || true
- name: Upload plugin artifact
uses: actions/upload-artifact@v4
with:
name: acode-plugin
path: .artifacts/*.zip