Skip to content

Commit 943c741

Browse files
change titles
1 parent 6eb2c3f commit 943c741

File tree

1 file changed

+14
-23
lines changed

1 file changed

+14
-23
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -26,27 +26,23 @@ jobs:
2626
with:
2727
fetch-depth: 0 # Get all history to allow automatic versioning using MinVer
2828

29-
# Install the .NET SDK indicated in the global.json file
30-
- name: Setup .NET
29+
- name: Install .NET
3130
uses: actions/setup-dotnet@v4
3231

33-
# Cache NuGet packages
34-
- uses: actions/cache@v4
32+
- name: Cache NuGet packages
33+
uses: actions/cache@v4
3534
with:
3635
path: ~/.nuget/packages
3736
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
3837
restore-keys: |
3938
${{ runner.os }}-nuget-
4039
41-
# Restore dependencies
4240
- name: Restore dependencies
4341
run: dotnet restore
4442

45-
# Create the NuGet package using MSBuild to match original AppVeyor parameters for deterministic builds
46-
- name: Pack NuGet package
43+
- name: Create NuGet package
4744
run: dotnet msbuild -t:Pack src/UTF-unknown.csproj -p:Configuration=Release -p:IncludeSymbols=true -p:SymbolPackageFormat=snupkg -p:ContinuousIntegrationBuild=true -p:EmbedUntrackedSources=true -p:PackageOutputPath=${{ env.NuGetDirectory }} -verbosity:minimal
4845

49-
# Publish the NuGet package as an artifact, so they can be used in the following jobs
5046
- name: Upload packages to artifacts
5147
uses: actions/upload-artifact@v4
5248
with:
@@ -59,24 +55,20 @@ jobs:
5955
runs-on: ubuntu-latest
6056
needs: [ create_nuget ]
6157
steps:
62-
# Install the .NET SDK indicated in the global.json file
63-
- name: Setup .NET
58+
- name: Install .NET
6459
uses: actions/setup-dotnet@v4
6560

66-
# Download the NuGet package created in the previous job
67-
- uses: actions/download-artifact@v4
61+
- name: Download NuGet package
62+
uses: actions/download-artifact@v4
6863
with:
6964
name: nuget
7065
path: ${{ env.NuGetDirectory }}
7166

72-
# Install nuget validator
7367
- name: Install nuget validator
7468
run: dotnet tool update Meziantou.Framework.NuGetPackageValidation.Tool --global
7569

7670
# Validate metadata and content of the NuGet package
7771
# https://www.nuget.org/packages/Meziantou.Framework.NuGetPackageValidation.Tool#readme-body-tab
78-
# If some rules are not applicable, you can disable them
79-
# using the --excluded-rules or --excluded-rule-ids option
8072
- name: Validate package
8173
run: meziantou.validate-nuget-package (Get-ChildItem "${{ env.NuGetDirectory }}/*.nupkg")
8274

@@ -98,11 +90,11 @@ jobs:
9890
steps:
9991
- uses: actions/checkout@v4
10092

101-
- name: Setup .NET
93+
- name: Install .NET
10294
uses: actions/setup-dotnet@v4
10395

104-
# Cache NuGet packages
105-
- uses: actions/cache@v4
96+
- name: Cache NuGet packages
97+
uses: actions/cache@v4
10698
with:
10799
path: ~/.nuget/packages
108100
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
@@ -130,14 +122,13 @@ jobs:
130122
runs-on: ubuntu-latest
131123
needs: [ validate_nuget, run_test ]
132124
steps:
133-
# Download the NuGet package created in the previous job
134-
- uses: actions/download-artifact@v4
125+
- name: Download NuGet package
126+
uses: actions/download-artifact@v4
135127
with:
136128
name: nuget
137129
path: ${{ env.NuGetDirectory }}
138130

139-
# Install the .NET SDK indicated in the global.json file
140-
- name: Setup .NET Core
131+
- name: Install .NET
141132
uses: actions/setup-dotnet@v4
142133

143134
# Publish the NuGet package to NuGet.org
@@ -146,7 +137,7 @@ jobs:
146137
# - Go to https://www.nuget.org/account/apikeys
147138
# - Create a new API key
148139
# - Copy the API key and add it as a secret in your GitHub repository with the name NUGET_API_KEY
149-
- name: Publish NuGet package
140+
- name: Publish NuGet package to nuget.org
150141
run: |
151142
foreach($file in (Get-ChildItem "${{ env.NuGetDirectory }}" -Recurse -Include *.nupkg, *.snupkg)) {
152143
dotnet nuget push $file --api-key "${{ secrets.NUGET_API_KEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate

0 commit comments

Comments
 (0)