Просмотр исходного кода

ci(nomount): ship NoMount artifact as extracted module, not zip-in-zip

The nomount-metamodule action builds a flashable NoMount-<commit>.zip,
and upload-artifact then wrapped that zip inside another zip, so
downloading the NoMount-Metamodule artifact gave a zip-in-a-zip.

Expose the extracted module directory (module.prop, bin/, ...) as a new
module_dir output, and upload that directory as the NoMount-Metamodule
artifact in both build workflows. The release job re-zips the module
directory into a flashable zip for release assets (mirroring the
AnyKernel3 step), so the shipped zip stays intact.

module_path output is kept for sha256 checksums and future consumers.
TheWildJames 2 недель назад
Родитель
Сommit
2e0f81d8b5

+ 4 - 0
.github/actions/nomount-metamodule/action.yml

@@ -8,6 +8,9 @@ outputs:
   module_path:
     description: 'Path to the flashable metamodule ZIP'
     value: ${{ steps.package.outputs.module_path }}
+  module_dir:
+    description: 'Path to the extracted metamodule directory (module.prop, bin/, ...)'
+    value: ${{ steps.package.outputs.module_dir }}
   commit:
     description: 'Verified NoMount source SHA'
     value: ${{ steps.package.outputs.commit }}
@@ -68,4 +71,5 @@ runs:
         )
         sha256sum "$module_zip" > "${module_zip}.sha256"
         echo "module_path=$module_zip" >> "$GITHUB_OUTPUT"
+        echo "module_dir=$module_dir" >> "$GITHUB_OUTPUT"
         echo "commit=$actual_commit" >> "$GITHUB_OUTPUT"

+ 14 - 1
.github/workflows/main.yml

@@ -523,7 +523,7 @@ jobs:
         uses: actions/upload-artifact@v7
         with:
           name: NoMount-Metamodule
-          path: ${{ steps.buildmod.outputs.module_path }}
+          path: ${{ steps.buildmod.outputs.module_dir }}
           if-no-files-found: error
           compression-level: 0
 
@@ -1148,6 +1148,19 @@ jobs:
           cd - >/dev/null
         done
 
+    - name: Zip NoMount Metamodule for Release
+      run: |
+        set -e
+        shopt -s nullglob
+
+        for dir in release-assets/*NoMount-Metamodule; do
+          zip_name="${dir}.zip"
+          rm -f "$zip_name"
+          cd "$dir"
+          zip -r -q -9 "../$(basename "$zip_name")" .
+          cd - >/dev/null
+        done
+
     - name: Create Release
       uses: softprops/action-gh-release@v1
       with:

+ 1 - 1
.github/workflows/root-variants.yml

@@ -94,7 +94,7 @@ jobs:
         uses: actions/upload-artifact@v7
         with:
           name: NoMount-Metamodule
-          path: ${{ steps.nomount-metamodule.outputs.module_path }}
+          path: ${{ steps.nomount-metamodule.outputs.module_dir }}
           if-no-files-found: error
 
   build: