Skip to content

Commit d0b772d

Browse files
committed
fix: Update CI/CD workflows for improved readability and consistency
1 parent 9dde7e9 commit d0b772d

2 files changed

Lines changed: 22 additions & 19 deletions

File tree

.github/workflows/cd.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Continuous Deployment
33
on:
44
push:
55
tags:
6-
- 'v[0-9]+.[0-9]+.[0-9]+.[0-9]+'
6+
- "v[0-9]+.[0-9]+.[0-9]+.[0-9]+"
77

88
permissions:
99
contents: write
@@ -24,6 +24,11 @@ jobs:
2424
- name: Setup .NET
2525
uses: actions/setup-dotnet@v5
2626

27+
- name: Install mono
28+
run: |
29+
sudo apt-get update
30+
sudo apt-get install -y mono-complete
31+
2732
- name: Extract version from tag
2833
id: version
2934
run: |
@@ -36,30 +41,26 @@ jobs:
3641

3742
- name: Build solution
3843
run: >
39-
dotnet build BB84.SourceGenerators.slnx
40-
--configuration Release
41-
--no-restore
42-
-p:VersionPrefix=${{ steps.version.outputs.VERSION }}
43-
-p:VersionSuffix=
44-
-p:FileVersion=${{ steps.version.outputs.VERSION }}
44+
dotnet build BB84.SourceGenerators.slnx --configuration Release
45+
--no-restore -p:VersionPrefix=${{ steps.version.outputs.VERSION }}
46+
-p:VersionSuffix= -p:FileVersion=${{ steps.version.outputs.VERSION }}
4547
-p:PackageVersion=${{ steps.version.outputs.VERSION }}
4648
4749
- name: Run tests
48-
run: dotnet test BB84.SourceGenerators.slnx --configuration Release --no-build --verbosity normal --logger "trx;LogFileName=test-results.trx"
50+
run: dotnet test BB84.SourceGenerators.slnx --configuration Release --no-build
51+
--verbosity normal --logger "trx;LogFileName=test-results.trx"
4952

5053
- name: Upload test results
5154
if: always()
5255
uses: actions/upload-artifact@v7
5356
with:
5457
name: test-results
55-
path: '**/TestResults/*.trx'
58+
path: "**/TestResults/*.trx"
5659

5760
- name: Create NuGet package
5861
run: >
5962
dotnet pack src/BB84.SourceGenerators/BB84.SourceGenerators.csproj
60-
--configuration Release
61-
--no-build
62-
--output ./artifacts
63+
--configuration Release --no-build --output ./artifacts
6364
-p:PackageVersion=${{ steps.version.outputs.VERSION }}
6465
6566
- name: Upload NuGet package artifact
@@ -70,9 +71,8 @@ jobs:
7071

7172
- name: Publish to NuGet.org
7273
run: >
73-
dotnet nuget push ./artifacts/*.nupkg
74-
--api-key ${{ secrets.NUGET_API_KEY }}
75-
--source https://api.nuget.org/v3/index.json
74+
dotnet nuget push ./artifacts/*.nupkg --api-key ${{
75+
secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
7676
--skip-duplicate
7777
7878
- name: Create GitHub Release

.github/workflows/ci.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,20 +30,23 @@ jobs:
3030
run: dotnet restore BB84.SourceGenerators.slnx
3131

3232
- name: Build solution
33-
run: dotnet build BB84.SourceGenerators.slnx --configuration Release --no-restore
33+
run: dotnet build BB84.SourceGenerators.slnx --configuration Release
34+
--no-restore
3435

3536
- name: Run tests
36-
run: dotnet test BB84.SourceGenerators.slnx --configuration Release --no-build --verbosity normal --logger trx
37+
run: dotnet test BB84.SourceGenerators.slnx --configuration Release --no-build
38+
--verbosity normal --logger trx
3739

3840
- name: Upload test results
3941
if: always()
4042
uses: actions/upload-artifact@v7
4143
with:
4244
name: test-results
43-
path: '**/TestResults/*.trx'
45+
path: "**/TestResults/*.trx"
4446

4547
- name: Validate NuGet package
46-
run: dotnet pack src/BB84.SourceGenerators/BB84.SourceGenerators.csproj --configuration Release --no-build --output ./artifacts
48+
run: dotnet pack src/BB84.SourceGenerators/BB84.SourceGenerators.csproj
49+
--configuration Release --no-build --output ./artifacts
4750

4851
- name: Upload NuGet package artifact
4952
uses: actions/upload-artifact@v7

0 commit comments

Comments
 (0)