Skip to content

Commit a313a5c

Browse files
authored
Merge pull request #221 from lavalink4net/fix/angelobreuer/fix_build
fix: Build and CI fixes
2 parents 2049f65 + 972dbcc commit a313a5c

File tree

3 files changed

+28
-10
lines changed

3 files changed

+28
-10
lines changed

.github/workflows/build.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ jobs:
2525
uses: actions/setup-dotnet@v4
2626
with:
2727
dotnet-version: |
28-
8.0.x
29-
9.0.x
28+
10.0.x
3029
3130
- name: Restore dependencies
3231
run: dotnet restore src/Lavalink4NET.sln
@@ -52,28 +51,31 @@ jobs:
5251
if_no_artifact_found: ignore
5352

5453
- name: Code Coverage Report
54+
if: matrix.configuration == 'Release'
5555
run: |
5656
dotnet tool install -g dotnet-reportgenerator-globaltool
5757
reportgenerator -reports:coverage/**/coverage.cobertura.xml -targetdir:coverage/ -sourcedirs:src/ "-reporttypes:TextSummary;HtmlSummary;MarkdownDeltaSummary" -historydir:coverage/history
5858
cat coverage/Summary.txt
5959
6060
- name: Archive code coverage results
6161
uses: actions/upload-artifact@v4
62+
if: matrix.configuration == 'Release'
6263
continue-on-error: true
6364
with:
6465
name: CoverageSummary.html
6566
path: coverage/summary.html
6667

6768
- name: Archive code coverage history
6869
uses: actions/upload-artifact@v4
70+
if: matrix.configuration == 'Release'
6971
continue-on-error: true
7072
with:
7173
name: CoverageHistory.html
7274
path: coverage/history/*.xml
7375

7476
- name: Add Coverage Pull Request Comment
7577
uses: marocchino/sticky-pull-request-comment@v2
76-
if: github.event_name == 'pull_request'
78+
if: github.event_name == 'pull_request' && matrix.configuration == 'Release'
7779
continue-on-error: true
7880
with:
7981
recreate: true
@@ -84,11 +86,11 @@ jobs:
8486
with:
8587
name: NuGet Packages-${{ matrix.configuration }}
8688
path: |
87-
'**/*.nupkg'
88-
'**/*.snupkg'
89+
artifacts/package/${{ matrix.configuration == 'Release' && 'release' || 'debug' }}/*.nupkg
90+
artifacts/package/${{ matrix.configuration == 'Release' && 'release' || 'debug' }}/*.snupkg
8991
9092
- name: Publish NuGet Packages
91-
if: matrix.configuration == 'Release'
93+
if: matrix.configuration == 'Release' && github.ref == 'refs/heads/dev'
9294
run: |
93-
dotnet nuget push "**/*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
94-
dotnet nuget push "**/*.snupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate || true
95+
dotnet nuget push "artifacts/package/${{ matrix.configuration == 'Release' && 'release' || 'debug' }}/*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
96+
dotnet nuget push "artifacts/package/${{ matrix.configuration == 'Release' && 'release' || 'debug' }}/*.snupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate || true

.github/workflows/docs.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
strategy:
1414
matrix:
15-
node-version: [18.x]
15+
node-version: [24.x]
1616

1717
steps:
1818
- uses: actions/checkout@v3
@@ -37,3 +37,11 @@ jobs:
3737
with:
3838
name: Documentation
3939
path: docs/build/
40+
41+
- name: Deploy
42+
uses: cloudflare/wrangler-action@v3
43+
with:
44+
apiToken: ${{ secrets.CLOUDFLARE_PAGES_API_KEY }}
45+
accountId: ${{ secrets.CLOUDFLARE_PAGES_ACCOUNT_ID }}
46+
command: pages deploy docs/build/ --project-name=lavalink4net
47+
gitHubToken: ${{ secrets.GITHUB_TOKEN }}

src/Directory.Build.props

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,15 @@
2929
<!-- Nullable -->
3030
<LangVersion>preview</LangVersion>
3131
<Nullable>enable</Nullable>
32-
<DebugType>embedded</DebugType>
32+
33+
<DebugType>portable</DebugType>
34+
<DebugSymbols>true</DebugSymbols>
35+
36+
<IncludeSymbols>true</IncludeSymbols>
37+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
38+
39+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
40+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
3341
</PropertyGroup>
3442

3543
<ItemGroup>

0 commit comments

Comments
 (0)