-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (72 loc) · 2.35 KB
/
Copy pathrelease.yml
File metadata and controls
79 lines (72 loc) · 2.35 KB
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: Release
on:
push:
branches: ['main']
jobs:
static-checks:
name: Run Static Analysis Checks
uses: digicatapult/shared-workflows/.github/workflows/static-checks-npm.yml@main
permissions:
security-events: write
with:
node_version: '24.x'
matrix_commands: '["lint", "depcheck", "check"]'
tests:
name: Run tests
uses: digicatapult/shared-workflows/.github/workflows/tests-npm.yml@main
permissions:
pull-requests: write
with:
node_version: '24.x'
tests: '["test", "test:integration"]'
npm_build_command: 'dotnet workload install wasm-tools-net8 && npm run publish'
docker_compose_file: ''
coverage: true
coverage_config_json: .c8rc.json
check-version:
name: 'Check version'
uses: digicatapult/shared-workflows/.github/workflows/check-version.yml@main
permissions: {}
generate-sbom:
name: 'Generate SBOM'
permissions: {}
uses: digicatapult/shared-workflows/.github/workflows/generate-sbom-npm.yml@main
with:
node_version: '24.x'
sbom_tool: '@cyclonedx/cyclonedx-npm'
npm_build_command: 'dotnet workload install wasm-tools-net8 && npm run publish'
additional_args: "--ignore-npm-errors"
enable_check_version: true
enable_dtrack_project: true
sbom_output_file: ${{ github.event.repository.name }}.cdx.json
secrets:
DTRACK_APIKEY: ${{ secrets.DTRACK_APIKEY }}
DTRACK_HOSTNAME: ${{ secrets.DTRACK_HOSTNAME }}
DTRACK_PARENT_GUID: ${{ secrets.DTRACK_PARENT_GUID }}
publish-npm:
name: 'Publish package to NPMJS'
needs:
- static-checks
- tests
- check-version
uses: digicatapult/shared-workflows/.github/workflows/release-module-npm.yml@main
permissions:
contents: write
id-token: write
packages: write
with:
node_version: '24.x'
registry_url: 'https://registry.npmjs.org'
registry_scope: '@digicatapult'
npm_build_command: 'dotnet workload install wasm-tools-net8 && npm run publish'
secrets:
REGISTRY_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }}
publish:
name: 'Publish release'
needs: [publish-npm, check-version, generate-sbom]
uses: digicatapult/shared-workflows/.github/workflows/release-github.yml@main
permissions:
contents: write
pull-requests: read
with:
get_sbom: true