Bump version #127
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Windows Binaries | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
Depscan-Windows-Build: | |
runs-on: windows-latest | |
permissions: | |
contents: write | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Checkout dep-scan | |
uses: actions/checkout@v4 | |
with: | |
repository: owasp-dep-scan/dep-scan | |
path: dep-scan | |
- name: Checkout cdxgen | |
uses: actions/checkout@v4 | |
with: | |
repository: CycloneDX/cdxgen | |
path: cdxgen | |
- name: Checkout cdxgen | |
uses: actions/checkout@v4 | |
with: | |
repository: CycloneDX/cdxgen-plugins-bin | |
path: cdxgen-plugins-bin | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20.x | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: '^1.19.1' | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/go-build | |
~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- name: Install pyinstaller | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install setuptools pyinstaller tzdata | |
cd dep-scan | |
python3 -m pip install ".[dev]" | |
pyinstaller --help | |
- name: Produce cdxgen pkg | |
run: | | |
cd cdxgen | |
npm install | |
npx caxa --input . --output "cdxgen.exe" -- "{{caxa}}/node_modules/.bin/node" "{{caxa}}/bin/cdxgen.js" | |
.\cdxgen.exe --version | |
(Get-FileHash .\cdxgen.exe).hash | Out-File -FilePath .\cdxgen.exe.sha256 | |
- name: Build cdxgen plugins | |
run: | | |
cd cdxgen-plugins-bin | |
.\build.ps1 | |
- name: Binary windows build | |
run: | | |
cd dep-scan | |
pyinstaller depscan/cli.py --noconfirm --log-level=WARN --nowindow --onefile --name depscan --add-data="vendor;vendor" --add-binary="../cdxgen/cdxgen.exe;local_bin" --add-binary="../cdxgen-plugins-bin/plugins/osquery/osqueryi-windows-amd64.exe;local_bin/osquery" --add-binary="../cdxgen-plugins-bin/plugins/goversion/goversion-windows-amd64.exe;local_bin/goversion" --add-binary="../cdxgen-plugins-bin/plugins/cargo-auditable/cargo-auditable-windows-amd64.exe;local_bin/cargo-auditable" --collect-submodules depscan --disable-windowed-traceback -i ../depscan.ico --version-file=../file_version_info.txt --noupx | |
.\dist\depscan.exe --help | |
(Get-FileHash .\dist\depscan.exe).hash | Out-File -FilePath .\dist\depscan.exe.sha256 | |
env: | |
PYTHONIOENCODING: utf-8 | |
LANG: en_US.utf-8 | |
- uses: actions/upload-artifact@v3 | |
if: startsWith(github.ref, 'refs/tags/') != true | |
with: | |
path: dep-scan/dist | |
name: depscan-windows | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
dep-scan/dist/depscan.exe | |
dep-scan/dist/depscan.exe.sha256 |