Jelajahi Sumber

Merge pull request #6 from r1172464137/master

Add support for compiling multiple targets
hazukieq 2 tahun lalu
induk
melakukan
25d1d9b975
1 mengubah file dengan 44 tambahan dan 5 penghapusan
  1. 44 5
      .github/workflows/build.yml

+ 44 - 5
.github/workflows/build.yml

@@ -5,9 +5,10 @@ on:
     types: [created]
     
 jobs:
-  release:
-    name: release ${{ matrix.target }}
+  release_node_inject:
+    name: release node_inject ${{ matrix.target }}
     runs-on: ubuntu-latest
+    if: github.event_name == 'release'
     strategy:
       fail-fast: false
       matrix:
@@ -15,15 +16,53 @@ jobs:
           - target: x86_64-pc-windows-gnu
             archive: zip
           - target: x86_64-unknown-linux-musl
-            archive: tar.gz tar.xz tar.zst
-          - target: x86_64-apple-darwin
+            archive: tar.gz
+    steps:
+      - uses: actions/checkout@master
+      - name: Compile and release
+        uses: rust-build/rust-build.action@master
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        with:
+          RUSTTARGET: ${{ matrix.target }}
+          ARCHIVE_TYPES: ${{ matrix.archive }}
+          ARCHIVE_NAME: node_inject_${{ matrix.target }}
+          
+  release_license-gen:
+    name: release license-gen ${{ matrix.target }}
+    runs-on: ubuntu-latest
+    if: github.event_name == 'release'
+    strategy:
+      fail-fast: false
+      matrix:
+        include:
+          - target: x86_64-pc-windows-gnu
             archive: zip
+          - target: x86_64-unknown-linux-musl
+            archive: tar.gz
     steps:
       - uses: actions/checkout@master
       - name: Compile and release
-        uses: rust-build/rust-build.action@v1.4.3
+        uses: rust-build/rust-build.action@master
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
         with:
           RUSTTARGET: ${{ matrix.target }}
           ARCHIVE_TYPES: ${{ matrix.archive }}
+          SRC_DIR: "license-gen"
+          ARCHIVE_NAME: license-gen_${{ matrix.target }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+