diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3e57b694..56202190 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,6 +39,11 @@ jobs: password: ${{ secrets.DOCKER_PASSWORD }} logout: true + - name: Install go-licenses + run: | + go install github.com/google/go-licenses@latest + echo "PATH=$PATH:$(go env GOPATH)/bin" >> $GITHUB_ENV + - name: Semantic Release uses: cycjimmy/semantic-release-action@b1b432f13acb7768e0c8efdec416d363a57546f2 # v4.1.1 with: diff --git a/.releaserc.json b/.releaserc.json index d3c051fc..39d37ab1 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -30,6 +30,10 @@ { "path": "rpc_so_x64.tar.gz", "label": "Linux x64 RPC Library" + }, + { + "path": "licenses.zip", + "label": "Third-party Licenses" } ] } diff --git a/build.sh b/build.sh index db6ac3dc..a51be549 100755 --- a/build.sh +++ b/build.sh @@ -26,4 +26,10 @@ tar cvfpz rpc_so_x64.tar.gz rpc.so.$version # Add Windows build to a zip file zip rpc_windows_x64.zip rpc_windows_x64.exe -zip rpc_windows_x86.zip rpc_windows_x86.exe \ No newline at end of file +zip rpc_windows_x86.zip rpc_windows_x86.exe + +# Generate license files +go-licenses save ./... --include_tests --save_path=licensefiles + +# Create a zip file for license files +zip -r licenses.zip licensefiles/ \ No newline at end of file