-
-
Notifications
You must be signed in to change notification settings - Fork 165
79 lines (76 loc) · 2.77 KB
/
binary-builds.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Binary builds
on:
push:
branches:
- master
- release/*
tags:
- 'v*'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
sae-builds:
strategy:
matrix:
os: [windows-latest]
include:
- os: windows-latest
build: |
Remove-Item ci -Recurse -Force
Remove-Item contrib -Recurse -Force
Remove-Item tools_config -Recurse -Force
npx @appthreat/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
Remove-Item node_modules -Recurse -Force
npm install --omit=optional --omit=dev --no-package-lock --no-audit --no-fund
npx @appthreat/caxa --input . --output "cdxgen-slim.exe" -- "{{caxa}}/node_modules/.bin/node" "{{caxa}}/bin/cdxgen.js"
.\cdxgen-slim.exe --version
(Get-FileHash .\cdxgen-slim.exe).hash | Out-File -FilePath .\cdxgen-slim.exe.sha256
npx @appthreat/caxa --input . --output "cdx-verify.exe" -- "{{caxa}}/node_modules/.bin/node" "{{caxa}}/bin/verify.js"
.\cdx-verify.exe --version
(Get-FileHash .\cdx-verify.exe).hash | Out-File -FilePath .\cdx-verify.exe.sha256
.\cdxgen.exe --help
.\cdxgen-slim.exe --help
artifact: cdxgen.exe
sartifact: cdxgen-slim.exe
vartifact: cdx-verify.exe
runs-on: ${{ matrix.os }}
permissions:
contents: write
packages: write
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '22.x'
- name: Produce sae
run: |
npm install --omit=dev --no-package-lock --no-audit --no-fund
${{ matrix.build }}
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: ${{ matrix.artifact }}
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.sartifact }}
path: ${{ matrix.sartifact }}
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.vartifact }}
path: ${{ matrix.vartifact }}
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
${{ matrix.artifact }}
${{ matrix.artifact }}.sha256
${{ matrix.sartifact }}
${{ matrix.sartifact }}.sha256
${{ matrix.vartifact }}
${{ matrix.vartifact }}.sha256