@@ -18,21 +18,24 @@ jobs:
1818 uses : actions/setup-node@v2
1919 with :
2020 node-version : ' 20'
21-
21+
2222 - name : Install pnpm
2323 run : npm install -g pnpm
2424
2525 - name : Install and build plugins
2626 run : |
27+
28+ pnpm install --save-dev semantic-release @semantic-release/changelog @semantic-release/git @semantic-release/github
29+
2730 mkdir -p dist/
2831 cd plugins
2932 for d in */ ; do
3033 echo "Processing plugin: $d"
3134 cd "$d" || { echo "Failed to access $d, skipping"; continue; }
32-
35+
3336 pnpm install || { echo "Failed to install dependencies for $d, skipping"; cd ..; continue; }
3437 pnpm run build || { echo "Failed to build $d, skipping"; cd ..; continue; }
35-
38+
3639 mkdir -p ../../dist/"$d"
3740 cp -r .millennium ../../dist/"$d".millennium || echo "Failed to move $d to dist"
3841
@@ -43,14 +46,12 @@ jobs:
4346 cp README ../../dist/"$d"README || echo "Failed to move README to dist"
4447
4548 # Get the backend folder from plugin.json and move it to dist
46-
4749 backend=$(jq -r '.backend' plugin.json)
4850 if [ "$backend" != "null" ]; then
4951 cp -r "$backend" ../../dist/"$d""$backend" || echo "Failed to move $backend to dist"
5052 fi
5153
5254 # Get extra files from include list in plugin.json and move them to dist
53-
5455 include=$(jq -r '.include' plugin.json)
5556 if [ "$include" != "null" ]; then
5657 for file in $include; do
@@ -61,11 +62,16 @@ jobs:
6162 cd ..
6263 done
6364
64- # - name: Commit and push changes
65- # run: |
66- # git config --global user.name "GitHub Actions"
67- # git config --global user.email "[email protected] " 68- # cd dist
69- # git add .
70- # git commit -m "Update built plugins"
71- # git push origin HEAD || echo "No changes to push"
65+ - name : Zip folders in /dist
66+ run : |
67+ cd dist
68+ for folder in */; do
69+ echo "Zipping folder: $folder"
70+ zip -r "$folder.zip" "$folder" || echo "Failed to zip $folder"
71+ done
72+
73+ - name : Run Semantic Release
74+ run : |
75+ npx semantic-release
76+ env :
77+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments