Skip to content

Commit

Permalink
feat: generate third party licenses zip for every release
Browse files Browse the repository at this point in the history
  • Loading branch information
graikhel-intel committed Oct 10, 2024
1 parent 4348a51 commit 74899ab
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 4 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
{
"path": "rpc_so_x64.tar.gz",
"label": "Linux x64 RPC Library"
},
{
"path": "licenses.zip",
"label": "Third-party Licenses"
}
]
}
Expand Down
8 changes: 7 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
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/

0 comments on commit 74899ab

Please sign in to comment.