Skip to content

Commit 2016418

Browse files
committed
NuGet updates and formatting
1 parent 7af615e commit 2016418

File tree

60 files changed

+750
-261
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+750
-261
lines changed

β€Ž.github/workflows/dotnet.ymlβ€Ž

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: .NET
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [ "main" ]
7+
pull_request:
8+
branches: [ "main" ]
9+
10+
jobs:
11+
build:
12+
name: Build and analyze
13+
runs-on: windows-latest
14+
env:
15+
SONAR_PROJECT: 'astar-dev-utilities'
16+
ProjectName: 'AStar.Dev.Utilities'
17+
RepositoryName: 'astar-dev-utilities'
18+
steps:
19+
- name: Set up JDK
20+
uses: actions/[email protected]
21+
with:
22+
java-version: 17
23+
distribution: 'zulu'
24+
25+
- name: Checkout
26+
uses: actions/[email protected]
27+
with:
28+
fetch-depth: 0
29+
30+
- name: πŸ›  Cache SonarQube Cloud packages
31+
uses: actions/[email protected]
32+
with:
33+
path: ~\sonar\cache
34+
key: ${{ runner.os }}-sonar
35+
restore-keys: ${{ runner.os }}-sonar
36+
37+
- name: πŸ›  Cache SonarQube Cloud scanner
38+
id: cache-sonar-scanner
39+
uses: actions/[email protected]
40+
with:
41+
path: .\.sonar\scanner
42+
key: ${{ runner.os }}-sonar-scanner
43+
restore-keys: ${{ runner.os }}-sonar-scanner
44+
45+
- name: πŸ›  Install SonarQube Cloud scanner
46+
if: steps.cache-sonar-scanner.outputs.cache-hit != 'true'
47+
shell: powershell
48+
run: |
49+
New-Item -Path .\.sonar\scanner -ItemType Directory
50+
dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner
51+
52+
- name: πŸ” Restore, πŸ›  Build and πŸ§ͺ Test with ☁️ SonarCloud / Qube
53+
env:
54+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
56+
shell: powershell
57+
run: |
58+
dotnet tool install --global dotnet-coverage
59+
.\.sonar\scanner\dotnet-sonarscanner begin /k:"astar-development_${{ env.SONAR_PROJECT }}" /o:"astar-development" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml /d:sonar.scanner.scanAll=false /d:sonar.scanner.skipJreProvisioning=true
60+
dotnet build --configuration Release
61+
dotnet-coverage collect 'dotnet test --filter "FullyQualifiedName!~Tests.EndToEnd"' -f xml -o 'coverage.xml'
62+
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"

β€Ž.github/workflows/main_astar-dev.ymlβ€Ž

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,55 @@
11
name: SonarQube
2+
23
permissions:
34
contents: read
5+
46
on:
57
push:
68
branches:
79
- main
810
pull_request:
911
types: [ opened, synchronize, reopened ]
12+
1013
jobs:
14+
1115
build:
1216
name: Build and analyze
1317
runs-on: windows-latest
18+
1419
steps:
1520
- name: Set up JDK 17
1621
uses: actions/setup-java@v4
1722
with:
1823
java-version: 17
19-
distribution: 'zulu' # Alternative distribution options are available.
24+
distribution: 'zulu'
25+
2026
- uses: actions/checkout@v4
2127
with:
22-
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
23-
- name: Cache SonarQube Cloud packages
28+
fetch-depth: 0
29+
30+
- name: πŸ›  Cache SonarQube Cloud packages
2431
uses: actions/cache@v4
2532
with:
2633
path: ~\sonar\cache
2734
key: ${{ runner.os }}-sonar
2835
restore-keys: ${{ runner.os }}-sonar
29-
- name: Cache SonarQube Cloud scanner
36+
37+
- name: πŸ›  Cache SonarQube Cloud scanner
3038
id: cache-sonar-scanner
3139
uses: actions/cache@v4
3240
with:
3341
path: .\.sonar\scanner
3442
key: ${{ runner.os }}-sonar-scanner
3543
restore-keys: ${{ runner.os }}-sonar-scanner
36-
- name: Install SonarQube Cloud scanner
44+
45+
- name: ☁️ Install SonarQube Cloud scanner
3746
if: steps.cache-sonar-scanner.outputs.cache-hit != 'true'
3847
shell: powershell
3948
run: |
4049
New-Item -Path .\.sonar\scanner -ItemType Directory
4150
dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner
42-
- name: Build and analyze
51+
52+
- name: πŸ›  Build, πŸ§ͺ Test and analyse with ☁️ SonarCloud / Qube
4353
env:
4454
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
4555
shell: powershell
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: πŸš€ Publish NuGet Package
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
contents: read
11+
env:
12+
ProjectName: 'AStar.Dev.Utilities'
13+
14+
steps:
15+
- name: 🧾 Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: πŸ›  Setup .NET
19+
uses: actions/setup-dotnet@v4
20+
with:
21+
dotnet-version: '9.x'
22+
23+
- name: πŸ” Restore dependencies
24+
run: dotnet restore
25+
26+
- name: πŸ›  Build solution
27+
run: dotnet build --configuration Release
28+
29+
- name: πŸ“¦ Pack NuGet package
30+
run: dotnet pack ./src/${{ env.ProjectName }}/${{ env.ProjectName }}.csproj --configuration Release --output ./nupkg
31+
32+
- name: πŸš€ Publish to NuGet.org
33+
run: dotnet nuget push ./nupkg/*.nupkg --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NuGet_API_Key }} #
34+

β€Ž.idea/.idea.AStar.Dev.Database.Testing/.idea/.nameβ€Ž

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Ž.idea/.idea.DatabaseTesting/.idea/.nameβ€Ž

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
Β (0)