-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (36 loc) · 1.67 KB
/
ci.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
name: Continuous Integration
on: [push]
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Setup .NET Core SDK 6.0.x
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Install dependencies
run: dotnet restore Action/PostMediumGitHubAction.sln
- name: Build
run: dotnet build Action/PostMediumGitHubAction.sln --configuration Release --no-restore
- name: Test
run: dotnet test Action/PostMediumGitHubAction.sln --no-restore
- name: Upload to SonarQube
run: |
dotnet tool install --global dotnet-sonarscanner
dotnet tool install --global JetBrains.dotCover.GlobalTool
dotnet sonarscanner begin /k:"philips-software_post-to-medium-action" /d:sonar.host.url="https://sonarcloud.io" /o:"philips-software" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.cs.dotcover.reportsPaths=dotCover.Output.html
dotnet build Action/PostMediumGitHubAction.sln
dotnet dotcover test Action/PostMediumGitHubAction.sln --dcReportType=HTML
dotnet sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
- uses: actions-ecosystem/action-get-latest-tag@v1
id: get-latest-tag
- uses: philips-software/[email protected]
- name: Generate SBOM
run: |
mkdir sbom
sbom-tool generate -b ./sbom -bc . -ps Philips -pn post-to-medium-action -pv ${{ steps.get-latest-tag.outputs.tag }} -nsb https://github.com/philips-software/post-to-medium-action
- uses: actions/upload-artifact@v3
with:
name: sbom
path: ./sbom/