Pārlūkot izejas kodu

chore: generate the Cargo lockfile for audit to run (#692)

* chore: generate the Cargo lockfile for audit to run

* add audit path
Jacob Bolda 5 gadi atpakaļ
vecāks
revīzija
947edb9b62
1 mainītis faili ar 15 papildinājumiem un 1 dzēšanām
  1. 15 1
      .github/workflows/release-cargo.yml

+ 15 - 1
.github/workflows/release-cargo.yml

@@ -20,22 +20,27 @@ jobs:
             registryName: tauri-bundler
             path: cli/tauri-bundler
             publishPath: cli/tauri-bundler/target/package # not in workspace so target folder is nested
+            auditPath: cli/tauri-bundler
           - name: tauri-utils
             registryName: tauri-utils
             path: tauri-utils
             publishPath: target/package
+            auditPath: ./
           - name: tauri-api
             registryName: tauri-api
             path: tauri-api
             publishPath: target/package
+            auditPath: ./
           - name: tauri-updater
             registryName: tauri-updater
             path: tauri-updater
             publishPath: target/package
+            auditPath: ./
           - name: tauri-core
             registryName: tauri
             path: tauri
             publishPath: target/package
+            auditPath: ./
     steps:
       - uses: actions/checkout@v2
         with:
@@ -54,6 +59,15 @@ jobs:
       - name: cargo login
         if: env.PACKAGE_VERSION != env.PUBLISHED_VERSION
         run: cargo login ${{ secrets.crate_token }}
+      - name: cargo generate-lockfile (for audit)
+        if: env.PACKAGE_VERSION != env.PUBLISHED_VERSION
+        working-directory: ${{ matrix.package.auditPath }}
+        env:
+          TAURI_DIST_DIR: ${{ runner.workspace }}/tauri/tauri/examples/communication/dist
+          TAURI_DIR: ${{ runner.workspace }}/tauri/tauri/examples/communication/src-tauri
+        run: |
+          echo "This is only for the audit. Lock files are listed in the gitignore so it should not be published."
+          cargo generate-lockfile
       - name: cargo package
         if: env.PACKAGE_VERSION != env.PUBLISHED_VERSION
         working-directory: ${{ matrix.package.path }}
@@ -66,7 +80,7 @@ jobs:
           echo "This is current latest:" $PUBLISHED_VERSION
       - name: cargo audit
         if: env.PACKAGE_VERSION != env.PUBLISHED_VERSION
-        working-directory: ${{ matrix.package.path }}
+        working-directory: ${{ matrix.package.auditPath }}
         env:
           TAURI_DIST_DIR: ${{ runner.workspace }}/tauri/tauri/examples/communication/dist
           TAURI_DIR: ${{ runner.workspace }}/tauri/tauri/examples/communication/src-tauri