Skip to content

Commit

Permalink
Remove sae builds (CycloneDX#946)
Browse files Browse the repository at this point in the history
* Remove sae builds

Signed-off-by: Prabhu Subramanian <[email protected]>

* Fix test

Signed-off-by: Prabhu Subramanian <[email protected]>

---------

Signed-off-by: Prabhu Subramanian <[email protected]>
  • Loading branch information
prabhu authored Apr 1, 2024
1 parent f185c2e commit bd1fe08
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 71 deletions.
71 changes: 1 addition & 70 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,73 +80,4 @@ jobs:
# ${{ matrix.artifact }}.sha256
# cdxgenx-darwin-arm64
# cdxgenx-darwin-arm64.sha256
sae-builds:
strategy:
matrix:
os: [windows-latest, macos-14, ubuntu-latest]
include:
- os: windows-latest
build: |
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
npm install --omit=optional
npx caxa --input . --exclude cdxgen.exe cdxgen.exe.sha256 --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
artifact: cdxgen.exe
vartifact: cdx-verify.exe
- os: macos-14
build: |
npx caxa --input . --output "cdxgen.app" -- "{{caxa}}/node_modules/.bin/node" "{{caxa}}/bin/cdxgen.js"
tar -czf "cdxgen.app.tgz" cdxgen.app
shasum -a 256 cdxgen.app.tgz > cdxgen.app.tgz.sha256
rm -rf node_modules
npm install --omit=optional
npx caxa --input . --exclude cdxgen.app cdxgen.app.tgz cdxgen.app.tgz.sha256 --output "cdx-verify.app" -- "{{caxa}}/node_modules/.bin/node" "{{caxa}}/bin/verify.js"
tar -czf "cdx-verify.app.tgz" cdx-verify.app
shasum -a 256 cdx-verify.app.tgz > cdx-verify.app.tgz.sha256
artifact: cdxgen.app.tgz
vartifact: cdx-verify.app.tgz
- os: ubuntu-latest
build: |
npx caxa --input . --output "cdxgen" -- "{{caxa}}/node_modules/.bin/node" "{{caxa}}/bin/cdxgen.js"
chmod +x cdxgen
./cdxgen --version
sha256sum cdxgen > cdxgen.sha256
rm -rf node_modules
npm install --omit=optional
npx caxa --input . --exclude cdxgen cdxgen.sha256 --output "cdx-verify" -- "{{caxa}}/node_modules/.bin/node" "{{caxa}}/bin/verify.js"
chmod +x cdx-verify
./cdx-verify --version
sha256sum cdx-verify > cdx-verify.sha256
artifact: cdxgen
vartifact: cdx-verify
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '21.x'
- name: Produce sae
run: |
npm ci
${{ matrix.build }}
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: ${{ matrix.artifact }}
- 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.vartifact }}
${{ matrix.vartifact }}.sha256

1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,4 @@ dist
.tool-versions
.idea/
test/
.git/
2 changes: 1 addition & 1 deletion utils.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1337,7 +1337,7 @@ test("parse github actions workflow data", () => {
let dep_list = parseGitHubWorkflowData(
readFileSync("./.github/workflows/nodejs.yml", { encoding: "utf-8" })
);
expect(dep_list.length).toEqual(5);
expect(dep_list.length).toEqual(3);
expect(dep_list[0]).toEqual({
group: "actions",
name: "checkout",
Expand Down

0 comments on commit bd1fe08

Please sign in to comment.