Skip to content

Commit 081b66f

Browse files
jaybarden1jbarden
andauthored
Features/update pipelines (#24)
* Update pipelines and add additional templates * NuGet updates * Delete the old sln file --------- Co-authored-by: Jason Barden <[email protected]>
1 parent 1a766a8 commit 081b66f

File tree

19 files changed

+164
-189
lines changed

19 files changed

+164
-189
lines changed

.github/instructions/instructions.instructions.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

.github/prompts/prompts.prompt.md

Lines changed: 0 additions & 27 deletions
This file was deleted.

.github/scratch.md

Whitespace-only changes.

.github/workflows/dotnet.yml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build the NuGet package
1+
name: .NET
22

33
on:
44
workflow_dispatch:
@@ -11,10 +11,7 @@ jobs:
1111
build:
1212
name: Build and analyze
1313
runs-on: windows-latest
14-
env:
15-
SONAR_PROJECT: astar-dev-logging-extensions
16-
ProjectName: 'AStar.Dev.Logging.Extensions'
17-
RepositoryName: 'astar-dev-logging-extensions'
14+
1815
steps:
1916
- name: Set up JDK
2017
uses: actions/[email protected]
@@ -49,23 +46,14 @@ jobs:
4946
New-Item -Path .\.sonar\scanner -ItemType Directory
5047
dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner
5148
52-
- name: 🔍 Restore, 🛠 Build and 🧪 Test with ☁️ SonarCloud / Qube
49+
- name: 🔍 Restore, 🛠 Build and 🧪 Test with ☁️ SonarCloud / Qube project - ${{ vars.SONAR_PROJECT_NAME }}
5350
env:
5451
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5552
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
5653
shell: powershell
5754
run: |
5855
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
56+
.\.sonar\scanner\dotnet-sonarscanner begin /k:"astar-development_${{ github.event.repository.name }}" /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
6057
dotnet build --configuration Release
6158
dotnet-coverage collect 'dotnet test --filter "FullyQualifiedName!~Tests.EndToEnd"' -f xml -o 'coverage.xml'
6259
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
63-
64-
- name: Pack NuGet package
65-
if: github.ref == 'refs/heads/main'
66-
run: dotnet pack .\src\${{ env.ProjectName }}\${{ env.ProjectName }}.csproj
67-
68-
- name: Push to NuGet
69-
if: github.ref == 'refs/heads/main'
70-
run: dotnet nuget push "**\${{ env.ProjectName }}.*.nupkg" --api-key ${{secrets.nuget_api_key}} --skip-duplicate --source https://api.nuget.org/v3/index.json
71-

.github/workflows/publish.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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+
12+
steps:
13+
- name: 🧾 Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: 🛠 Setup .NET
17+
uses: actions/setup-dotnet@v4
18+
with:
19+
dotnet-version: '9.x'
20+
21+
- name: 🔍 Restore dependencies
22+
run: dotnet restore
23+
24+
- name: 🛠 Build solution
25+
run: dotnet build --configuration Release
26+
27+
- name: 📦 Pack NuGet package for ${{ github.event.repository.name }}
28+
run: dotnet pack ./src/**/*.csproj --configuration Release --output ./nupkg
29+
30+
- name: 🚀 Publish to NuGet.org
31+
run: dotnet nuget push ./nupkg/*.nupkg --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NuGet_API_Key }} #
32+

.idea/.idea.AStar.Dev.Logging.Extensions/.idea/sonarlint.xml

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

AStar.Dev.Logging.Extensions.sln

Lines changed: 0 additions & 52 deletions
This file was deleted.

AStar.Dev.Logging.Extensions.slnx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<Solution>
2+
<Folder Name="/.github/">
3+
<File Path=".github/dependabot.yml"/>
4+
</Folder>
5+
<Folder Name="/.github/workflows/">
6+
<File Path=".github/workflows/dotnet.yml"/>
7+
</Folder>
8+
<Folder Name="/Solution Items/">
9+
<File Path="blog-draft.md"/>
10+
</Folder>
11+
<Folder Name="/src/">
12+
<Project Path="src/AStar.Dev.Logging.Extensions/AStar.Dev.Logging.Extensions.csproj"/>
13+
</Folder>
14+
<Folder Name="/tests/">
15+
<Project Path="tests/AStar.Dev.Logging.Extensions.Tests.Unit/AStar.Dev.Logging.Extensions.Tests.Unit.csproj"/>
16+
</Folder>
17+
</Solution>

AStar.png

-12.2 KB
Binary file not shown.

astar.ico

16.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)