From e0134aedeecb505af5420744f8ce8a647f348870 Mon Sep 17 00:00:00 2001 From: rapperskull Date: Fri, 1 Mar 2024 00:29:13 +0100 Subject: [PATCH] Include dependencies licenses in release --- .github/workflows/CI.yml | 80 +++++++++++++++++++++++++++++++--------- 1 file changed, 62 insertions(+), 18 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index de11ee0..9f31f90 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -25,9 +25,29 @@ jobs: name: tag path: tag + copy-licenses: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Copy licenses + run: | + mkdir licenses + cp LICENSE.TXT licenses/ + for dep in deps/*/ + do + dep_name="$(basename ${dep})" + mkdir "licenses/${dep_name}" + cp "deps/${dep_name}/LICENSE"* "licenses/${dep_name}/" + done + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: LICENSES + path: licenses + build-windows: runs-on: windows-latest - needs: Init + needs: [Init, copy-licenses] env: POWERSHELL_TELEMETRY_OPTOUT: 1 strategy: @@ -53,10 +73,14 @@ jobs: - name: Build working-directory: build run: cmake --build . --config ${{ matrix.configuration }} -j $env:NUMBER_OF_PROCESSORS + - name: Download licenses + uses: actions/download-artifact@v4 + with: + name: LICENSES + path: artifacts - name: Prepare artifacts run: | - mkdir artifacts - mv -vb build\${{ matrix.configuration }}\extract-xiso.exe, LICENSE.TXT artifacts + mv -vb build\${{ matrix.configuration }}\extract-xiso.exe artifacts - uses: actions/upload-artifact@v4 with: name: extract-xiso-${{ matrix.artifact_os }}-${{ matrix.configuration }} @@ -64,7 +88,7 @@ jobs: build-linux: runs-on: ubuntu-latest - needs: Init + needs: [Init, copy-licenses] steps: - uses: actions/checkout@v4 with: @@ -76,10 +100,14 @@ jobs: - name: Build working-directory: build run: cmake --build . -j $(nproc --all) + - name: Download licenses + uses: actions/download-artifact@v4 + with: + name: LICENSES + path: artifacts - name: Prepare artifacts run: | - mkdir artifacts - mv -v build/extract-xiso LICENSE.TXT artifacts + mv -v build/extract-xiso artifacts - uses: actions/upload-artifact@v4 with: name: extract-xiso-linux @@ -87,7 +115,7 @@ jobs: build-macos: runs-on: macos-latest - needs: Init + needs: [Init, copy-licenses] steps: - uses: actions/checkout@v4 with: @@ -99,10 +127,14 @@ jobs: - name: Build working-directory: build run: cmake --build . -j $(sysctl -n hw.ncpu) + - name: Download licenses + uses: actions/download-artifact@v4 + with: + name: LICENSES + path: artifacts - name: Prepare artifacts run: | - mkdir artifacts - mv -v build/extract-xiso LICENSE.TXT artifacts + mv -v build/extract-xiso artifacts - uses: actions/upload-artifact@v4 with: name: extract-xiso-macos @@ -110,7 +142,7 @@ jobs: build-freebsd: runs-on: ubuntu-latest - needs: Init + needs: [Init, copy-licenses] env: SYSROOT_PATH: /opt/cross-freebsd-13 steps: @@ -133,10 +165,14 @@ jobs: - name: Build working-directory: build run: cmake --build . -j $(nproc --all) + - name: Download licenses + uses: actions/download-artifact@v4 + with: + name: LICENSES + path: artifacts - name: Prepare artifacts run: | - mkdir artifacts - mv -v build/extract-xiso LICENSE.TXT artifacts + mv -v build/extract-xiso artifacts - uses: actions/upload-artifact@v4 with: name: extract-xiso-freebsd @@ -144,7 +180,7 @@ jobs: build-openbsd: runs-on: ubuntu-latest - needs: Init + needs: [Init, copy-licenses] env: SYSROOT_PATH: /opt/cross-openbsd-7 steps: @@ -167,10 +203,14 @@ jobs: - name: Build working-directory: build run: cmake --build . -j $(nproc --all) + - name: Download licenses + uses: actions/download-artifact@v4 + with: + name: LICENSES + path: artifacts - name: Prepare artifacts run: | - mkdir artifacts - mv -v build/extract-xiso LICENSE.TXT artifacts + mv -v build/extract-xiso artifacts - uses: actions/upload-artifact@v4 with: name: extract-xiso-openbsd @@ -178,7 +218,7 @@ jobs: build-netbsd: runs-on: ubuntu-latest - needs: Init + needs: [Init, copy-licenses] env: SYSROOT_PATH: /opt/cross-netbsd-9 steps: @@ -201,10 +241,14 @@ jobs: - name: Build working-directory: build run: cmake --build . -j $(nproc --all) + - name: Download licenses + uses: actions/download-artifact@v4 + with: + name: LICENSES + path: artifacts - name: Prepare artifacts run: | - mkdir artifacts - mv -v build/extract-xiso LICENSE.TXT artifacts + mv -v build/extract-xiso artifacts - uses: actions/upload-artifact@v4 with: name: extract-xiso-netbsd