1+ name : SBOM
2+
3+ on :
4+ push :
5+ branches :
6+ - sbom-dev
7+
8+ permissions :
9+ contents : read
10+ packages : read
11+
12+ jobs :
13+ sbom :
14+ if : ${{ github.event_name == 'push' && github.ref_type == 'branch' && github.ref_name == 'sbom-dev' }}
15+ runs-on : ubuntu-latest
16+
17+ steps :
18+ - name : Get sources
19+ uses : actions/checkout@v4
20+
21+ - name : Install pnpm
22+ uses : pnpm/action-setup@v6
23+
24+ - name : Use Node.js
25+ uses : actions/setup-node@v4
26+ with :
27+ node-version-file : ' .node-version'
28+ cache : ' pnpm'
29+ registry-url : ' https://registry.npmjs.org'
30+
31+ - name : Install dependencies
32+ run : pnpm install --frozen-lockfile
33+
34+ - name : Test devextreme-schematics
35+ run : pnpm --filter devextreme-schematics run test
36+
37+ - name : Build devextreme-schematics
38+ run : pnpm --filter devextreme-schematics run build
39+
40+ - name : Pack packages
41+ shell : bash
42+ run : |
43+ mkdir -p artifacts/npm
44+
45+ package_cli_tgz="$(pnpm --filter devextreme-cli pack --json --pack-destination artifacts/npm | jq -er '.filename')"
46+ package_schematics_tgz="$(pnpm --filter devextreme-schematics pack --json --pack-destination artifacts/npm | jq -er '.filename')"
47+
48+ echo "PACKAGE_CLI_TGZ=$package_cli_tgz" >> "$GITHUB_ENV"
49+ echo "PACKAGE_SCHEMATICS_TGZ=$package_schematics_tgz" >> "$GITHUB_ENV"
50+
51+ - name : Upload packages
52+ uses : actions/upload-artifact@v7
53+ with :
54+ name : packages
55+ path : artifacts/npm/*.tgz
56+ if-no-files-found : error
57+ retention-days : 1
58+
59+ - name : Build SBOMs
60+ env :
61+ NODE_AUTH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
62+ run : |
63+ pnpm set //npm.pkg.github.com/:_authToken="$NODE_AUTH_TOKEN"
64+ cd tools/make-sbom && pnpm install --frozen-lockfile && pnpm run make-sbom-hashed
65+
66+ - name : Upload SBOMs
67+ uses : actions/upload-artifact@v7
68+ with :
69+ name : sbom
70+ path : tools/make-sbom/dist
71+ if-no-files-found : error
72+ retention-days : 1
73+
0 commit comments